-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate-dist.sh
55 lines (40 loc) · 2.16 KB
/
create-dist.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
55
#!/bin/bash
# only arg provided to this script must be project version string
set -e
DIST_DIR=build/mmtc-dist-tmp
if [[ -d $DIST_DIR ]]; then
rm -r $DIST_DIR
fi
mkdir -p $DIST_DIR
mkdir $DIST_DIR/bin
cp mmtc-core/bin/mmtc $DIST_DIR/bin
if [[ "$OSTYPE" == "darwin"* ]]; then
# BSD sed
sed -i '' "s|@VERSION@|${1}|" $DIST_DIR/bin/mmtc
else
# assume Linux (and GNU sed)
sed -i "s/@VERSION@/${1}/" $DIST_DIR/bin/mmtc
fi
mkdir $DIST_DIR/conf
cp mmtc-core/src/main/resources/log4j2.xml $DIST_DIR/conf/
cp mmtc-core/src/main/resources/properties.dtd $DIST_DIR/conf/
cp mmtc-core/src/main/resources/TimeCorrelationConfigProperties.xsd $DIST_DIR/conf/
mkdir $DIST_DIR/conf/examples
cp mmtc-core/src/main/resources/TimeCorrelationConfigProperties-base.xml $DIST_DIR/conf/examples/
cp mmtc-core/src/test/resources/examples/TimeCorrelationConfigProperties-all.xml $DIST_DIR/conf/examples/
cp mmtc-core/src/test/resources/examples/SclkPartitionMap.csv $DIST_DIR/conf/examples/
cp mmtc-core/src/test/resources/examples/GroundStationMap.csv $DIST_DIR/conf/examples/
mkdir $DIST_DIR/lib
cp mmtc-core/build/libs/mmtc-core-$1-app.jar $DIST_DIR/lib/
mkdir -p $DIST_DIR/lib/naif/JNISpice
cp -r jnispice/JNISpice/lib $DIST_DIR/lib/naif/JNISpice/
cp jnispice/JNISpice/N0067 $DIST_DIR/lib/naif/JNISpice/
cp -r jnispice/JNISpice/doc $DIST_DIR/lib/naif/JNISpice/
mkdir $DIST_DIR/lib/plugins
cp mmtc-plugin-ampcs/build/libs/mmtc-plugin-ampcs-$1.jar $DIST_DIR/lib/plugins/
mkdir $DIST_DIR/docs
cp build/docs/MMTC_Users_Guide.pdf $DIST_DIR/docs
mkdir $DIST_DIR/log/
touch $DIST_DIR/log/.keep
mkdir $DIST_DIR/output/
touch $DIST_DIR/output/.keep