-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmk
More file actions
executable file
·65 lines (51 loc) · 1.06 KB
/
mk
File metadata and controls
executable file
·65 lines (51 loc) · 1.06 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
#!/usr/bin/env bash
set -e
APP=datagen
BINDIR="$HOME/bin"
if [ ! -d $BINDIR ]
then
echo "Directory doesn't exist; please create it: $BINDIR"
exit 1
fi
LINK=$BINDIR/$APP
##################################################
# Parse arguments:
# [clean | skiptest]
##################################################
CLEAN=""
NOTEST=""
DONEARGS=0
while [ "$DONEARGS" -eq 0 ]; do
if [ "$1" == "" ]; then
DONEARGS=1
elif [ "$1" == "clean" ]; then
CLEAN="clean"
shift 1
elif [ "$1" == "skiptest" ]; then
NOTEST="-DskipTests"
shift 1
else
echo "Unrecognized argument: $1"
exit 1
fi
done
##################################################
# Perform clean, if requested
#
if [ "$CLEAN" != "" ]; then
echo "...cleaning"
mvn clean
if [ -f $LINK ]; then
echo "....removing old driver: ${LINK}"
rm $LINK
fi
fi
##################################################
# Compile and test
#
if [ "$NOTEST" != "" ]; then
echo "...skipping tests"
fi
echo "...generating data classes"
mvn install $NOTEST
cp .jsproject/driver.sh $LINK