|
@@ -1,14 +1,26 @@
|
1
|
1
|
#!/bin/sh
|
2
|
2
|
|
|
3
|
+# Jar names of plugins to add to ALL installers. (* means all)
|
|
4
|
+plugins=""
|
|
5
|
+
|
|
6
|
+# Additional Jar names of plugins to add to only Windows installers. (* means all)
|
|
7
|
+plugins_windows=""
|
|
8
|
+
|
|
9
|
+# Additional Jar names of plugins to add to only linux installers. (* means all)
|
|
10
|
+plugins_linux=""
|
|
11
|
+
|
3
|
12
|
showHelp() {
|
4
|
13
|
echo "This will generate the different DMDirc installers."
|
5
|
14
|
echo "Usage: ${0} [params] <release>"
|
6
|
15
|
echo "Release can be either 'trunk', a valid tag, or a branch (if -b is passed)"
|
7
|
16
|
echo "The following params are known:"
|
8
|
17
|
echo "---------------------"
|
9
|
|
- echo "-b, --branch <release> is a branch"
|
10
|
|
- echo "-h, --help Help information"
|
11
|
|
- echo "-o, --opt [options] Additional options to pass to the make*Installer.sh files"
|
|
18
|
+ echo "-b, --branch <release> is a branch"
|
|
19
|
+ echo "-p, --plugins <plugins> Plugins to add to all the jars."
|
|
20
|
+ echo "-pl, --plugins-linux <plugins> Plugins to linux installer."
|
|
21
|
+ echo "-pw, --plugins-windows <plugins> Plugins to linux installer."
|
|
22
|
+ echo "-h, --help Help information"
|
|
23
|
+ echo "-o, --opt <options> Additional options to pass to the make*Installer.sh files"
|
12
|
24
|
echo "---------------------"
|
13
|
25
|
exit 0;
|
14
|
26
|
}
|
|
@@ -20,6 +32,18 @@ BRANCH=""
|
20
|
32
|
while test -n "$1"; do
|
21
|
33
|
LAST=${1}
|
22
|
34
|
case "$1" in
|
|
35
|
+ --plugins|-p)
|
|
36
|
+ shift
|
|
37
|
+ plugins="${1}"
|
|
38
|
+ ;;
|
|
39
|
+ --plugins-linux|-pl)
|
|
40
|
+ shift
|
|
41
|
+ plugins_linux="${1}"
|
|
42
|
+ ;;
|
|
43
|
+ --plugins-windows|-pw)
|
|
44
|
+ shift
|
|
45
|
+ plugins_windows="${1}"
|
|
46
|
+ ;;
|
23
|
47
|
--opt|-o)
|
24
|
48
|
shift
|
25
|
49
|
OPT="${1} "
|
|
@@ -34,6 +58,17 @@ while test -n "$1"; do
|
34
|
58
|
shift
|
35
|
59
|
done
|
36
|
60
|
|
|
61
|
+if [ "${plugins}" = "*" -o "${plugins_linux}" = "*" -o "${plugins_windows}" = "*" ]; then
|
|
62
|
+ echo "Something is all.";
|
|
63
|
+ allPlugins=""
|
|
64
|
+ for thisfile in `ls -1 ../plugins/*.jar`; do
|
|
65
|
+ allPlugins=${allPlugins}" ${thisfile##*/}"
|
|
66
|
+ done
|
|
67
|
+ if [ "${plugins}" = "*" ]; then plugins=${allPlugins}; fi
|
|
68
|
+ if [ "${plugins_linux}" = "*" ]; then plugins_linux=${allPlugins}; fi
|
|
69
|
+ if [ "${plugins_windows}" = "*" ]; then plugins_windows=${allPlugins}; fi
|
|
70
|
+fi;
|
|
71
|
+
|
37
|
72
|
if [ "${LAST}" != "" ]; then
|
38
|
73
|
if [ "${LAST}" = "trunk" ]; then
|
39
|
74
|
RELEASE=""
|
|
@@ -112,18 +147,19 @@ fi
|
112
|
147
|
|
113
|
148
|
cd ${THISDIR}
|
114
|
149
|
rm -Rf installer_temp
|
|
150
|
+
|
115
|
151
|
echo "================================================================"
|
116
|
152
|
echo "Building linux installer"
|
117
|
153
|
echo "================================================================"
|
118
|
154
|
cd linux
|
119
|
|
-./makeInstallerLinux.sh ${OPT}-c -k ${BRANCH}${RELEASE}
|
|
155
|
+./makeInstallerLinux.sh ${OPT}-c -k ${BRANCH}${RELEASE} -p "${plugins} ${plugins_linux}"
|
120
|
156
|
cd ${THISDIR}
|
121
|
157
|
|
122
|
158
|
echo "================================================================"
|
123
|
159
|
echo "Building Windows installer"
|
124
|
160
|
echo "================================================================"
|
125
|
161
|
cd windows
|
126
|
|
-./makeInstallerWindows.sh ${OPT}-k -s ${BRANCH}${RELEASE}
|
|
162
|
+./makeInstallerWindows.sh ${OPT}-k -s ${BRANCH}${RELEASE} -p "${plugins} ${plugins_windows}"
|
127
|
163
|
cd ${THISDIR}
|
128
|
164
|
|
129
|
165
|
MD5BIN=`which md5sum`
|