-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake
executable file
·49 lines (41 loc) · 934 Bytes
/
make
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
#!/bin/bash
function resolve_file() {
local target_file=$1
cd `dirname $target_file`
target_file=`basename $target_file`
# Iterate down a (possible) chain of symlinks
while [ -L "$target_file" ]
do
target_file=`readlink $target_file`
cd `dirname $target_file`
target_file=`basename $target_file`
done
# Compute the canonicalized name by finding the physical path
# for the directory we're in and appending the target file.
local readonly phys_dir=`pwd -P`
echo "$phys_dir/$target_file"
}
readonly THIS_FILE=$(resolve_file ${BASH_SOURCE[0]})
readonly DIR=$(dirname "$THIS_FILE")
function make_parser() {
cd $DIR/rs-parser
cargo build
}
function make_reader() {
cd $DIR/java-reader
cargo build
}
function make_core_jar() {
cd $DIR/tzio-core
gradle build
}
action="$1"
case $action in
parser) make_parser;;
reader) make_reader;;
core) make_core_jar;;
'')
make_parser
make_core_jar
make_reader ;;
esac