-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·55 lines (51 loc) · 2.19 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/sh
#----------------------------------------------------
# This script puts together the entire districution
#----------------------------------------------------
version=1.1.1
while getopts v:d: flag
do
case "${flag}" in
v) version=${OPTARG};;
d) distribute=true;;
esac
done
echo "version : ${version}";
echo "distribute : ${distribute}";
#----------------------------------------------------
# Create directory structure
#----------------------------------------------------
echo 'cleanning up'
rm -rf j4np-${version}
rm -rf j4np-${version}.tar.gz
mkdir -p j4np-${version}/lib/core
mkdir -p j4np-${version}/lib/ext
#----------------------------------------------------
# Copy Jars and directories to the distribution
#----------------------------------------------------
echo 'copying jars and exacutable'
cp -r modules/j4np-package/bin j4np-${version}/.
cp -r modules/j4np-package/etc j4np-${version}/.
cp -r modules/j4np-package/scripts j4np-${version}/.
cp -r modules/j4np-neural/etc/networks j4np-${version}/etc/.
cp modules/j4np-package/target/*with-dependencies.jar j4np-${version}/lib/core/j4np-${version}.jar
#cp extensions/j4np-analysis/target/*with-dependencies.jar j4np-${version}/lib/ext/.
cp extensions/j4ml-track/target/*with-dependencies.jar j4np-${version}/lib/ext/.
cp extensions/j4np-clas12io/target/*with-dependencies.jar j4np-${version}/lib/ext/.
cp extensions/j4ml-classifier/target/*with-dependencies.jar j4np-${version}/lib/ext/.
#cp extensions/j4np-level3/target/*shaded.jar j4np-${version}/lib/ext/.
#cp extensions/j4ml-classifier/target/*with-depend*.jar j4np-${version}/lib/ext/.
#cp extensions/j4ml-display/target/*with-dependencies.jar j4np-${version}/lib/ext/.
#----------------------------------------------------
# package it, and distribute it if the flag is set
#----------------------------------------------------
gtar -cf j4np-${version}.tar j4np-${version}
gzip j4np-${version}.tar
#----------------------------------------------------
# Copy local distribution
#----------------------------------------------------
echo 'copying local distribution to : ' ${PROJECT}
cp -r j4np-${version} $PROJECT/.
echo 'done....'
#jput -r j4np-${version}.tar.gz
echo 'done copying to jlab'