forked from CharlesZ-Chen/ReadChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-dljc.sh
More file actions
executable file
·32 lines (25 loc) · 861 Bytes
/
run-dljc.sh
File metadata and controls
executable file
·32 lines (25 loc) · 861 Bytes
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
#!/bin/bash
# this script depends on the checker branch of Charles's fork of dljc:
# https://github.com/CharlesZ-Chen/do-like-javac.git
# (this is not a good way to solve the problem, but currently since
# dljc override the javac classpath in its cmd, thus I have to add a little code
# of joining the sys CLASSPATH to the --classpath in dljc's javac cmd.)
CUR_DIR=$(pwd)
ROOT=$(cd $(dirname "$0")/.. && pwd)
READ_CHECKER=$ROOT/ReadChecker
DLJC=$ROOT/do-like-javac
export CLASSPATH=$READ_CHECKER/bin:$READ_CHECKER/lib
if [ ! -d $DLJC ] ; then
cd $ROOT
git clone https://github.com/CharlesZ-Chen/do-like-javac.git --branch checker
fi
#parsing build command of the target program
build_cmd=$1
shift
while [ $# -gt 0 ]
do
build_cmd="$build_cmd $1"
shift
done
cd $CUR_DIR
python $DLJC/dljc -t checker --checker read.ReadChecker -- $build_cmd