-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-apps.sh
More file actions
executable file
·83 lines (72 loc) · 2.45 KB
/
install-apps.sh
File metadata and controls
executable file
·83 lines (72 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#******************************************************************************#
# #
# install-apps.sh #
# #
#******************************************************************************#
# #
# This script batch installs apps to your Sharedigm instance. #
# #
# Author(s): Abe Megahed #
# #
# This file is subject to the terms and conditions defined in #
# 'LICENSE.md', which is part of this source code distribution. #
# #
#******************************************************************************#
# Copyright (C) 2016-2024, Megahed Labs LLC, www.sharedigm.com #
#******************************************************************************#
# check command line arguments
#
if [ $# -lt 1 ] ; then
echo "Usage: sh install-apps.sh DIRNAME [APP1 APP2 APP3...]"
exit 0
fi
target=$1
# confirm install
#
if [ $# -eq 1 ] ; then
echo "Would you like to install all apps to $target (Y/N)?"
elif [ $# -eq 2 ] ; then
echo "Would you like to install $2 to $target (Y/N)?"
else
echo "Would you like to install these $(($# - 1)) apps to $target (Y/N)?"
fi
read prompt
if [ $prompt != 'y' ] && [ $prompt != 'Y' ]; then
echo "Quitting."
exit 0
fi
function install_app() {
echo "Installing $1"
cd apps/$1
sh install.sh $target -f
cd ../..
}
# check if we specify apps
#
if [ $# -lt 2 ] ; then
# iterate over all apps
#
for app in apps/*/; do
# remove directory name from app name
#
app=${app/apps\//}
# remove slashes from app name
#
app=${app/\//}
# install non-core apps
#
if [ $app != 'app' ] && [ $app != 'file-browser' ] && [ $app != 'help-viewer' ] && [ $app != 'settings-browser' ] && [ $app != 'settings-manager' ]; then
install_app $app
fi
done
else
# iterate over specified apps
#
for app in "${@:2}"
do
install_app $app
done
fi
# recompile styles
#
sass $target/styles/styles.scss $target/styles/styles.css