-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·54 lines (46 loc) · 1.33 KB
/
build.sh
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
#!/bin/bash
# written by LI. Yi
# created on Feb 23rd, 2017
ROOT="$( cd "$( dirname "$0" )" && pwd )"
# building step 1. apply platform-specific settings
platform=$(uname -s)
echo $ROOT
# backup platform-specific settings
cp "$ROOT/native.properties" "$ROOT/building_scripts/native.properties.backup"
case $platform in
Darwin)
# use default settings for this platform
cp "$ROOT/building_scripts/native.properties.Darwin" "$ROOT/native.properties"
;;
Linux)
# check if the system is 32-bits or 64-bits
bits=$(getconf LONG_BIT)
cp "$ROOT/building_scripts/native.properties.Linux.$bits" "$ROOT/native.properties"
;;
*)
# TODO currently the script only support 64 bits windows system
cp "$ROOT/building_scripts/native.properties.Windows.64" "$ROOT/native.properties"
esac
# build core package
cd "$ROOT"
mvn package
# build plugins
cd "$ROOT/plugins"
bash build.sh
# build distributions
if [ "$1" == "" ]; then
dist=standard
else
dist=$1
fi
cd "$ROOT/distributions/$dist"
bash build.sh
cp epmc-$dist.jar "$ROOT/"
cd "$ROOT"
echo "ePMC distribution <$dist> has been packaged successfully!"
echo "the target jar file is located in $ROOT/epmc-$dist.jar"
echo "start your ePMC trip with the following line:"
echo ""
echo " java -jar epmc-$dist.jar help"
echo ""
echo "enjoy!"