-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathjcute.in
87 lines (76 loc) · 1.83 KB
/
jcute.in
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
cd tmpjcute
export JAVA_LIB_PATH=..
export LD_LIBRARY_PATH=..
export PATH=$PATH:..
SOURCE=$1
arch=$(uname)
if [ $arch != "Linux" ]
then
CLASSPATH="classes;../jcute.jar"
else
CLASSPATH=classes:../jcute.jar
fi
iter=50000;
oldarg="";
arguments="";
shift 1;
x="0";
for arg in $@
do
if [ "$oldarg" = "-i" ]
then
iter=$arg;
fi
if [ "$x" = "0" ]
then
x="1";
else
x="0";
if [ "$oldarg" != "-i" ]
then
arguments="$arguments:$oldarg:$arg";
fi
fi
oldarg=$arg
done
if [ "$x" = "1" ]
then
arguments="$arguments:$arg";
fi
if [ "$PMSG" != "0" ]
then
echo "[Execution Path 1] java $SOURCE $arguments -m 2"
fi
java -ea -Xmx512m -Xms512m -classpath $CLASSPATH -Djava.library.path=$JAVA_LIB_PATH -Dcute.args="$arguments:-m:2" $SOURCE ;
ret=$?;
ret=$((ret&2));
if [[ ($ret -eq 2) ]]
then
exit
else
# echo "*********************** Input and Trace for Last Execution *****************************"
# java -ea -Xmx512m -Xms512m -classpath $CLASSPATH -Djava.library.path=$JAVA_LIB_PATH -Dcute.args="$arguments:-m:1:-t:512" $SOURCE
# echo "******************************************************************************"
echo -n ""
fi
i=2
while [ $i -le $iter ]
do
if [ "$PMSG" != "0" ]
then
echo "[Execution Path $i] java $SOURCE $arguments"
fi
java -ea -Xmx512m -Xms512m -classpath $CLASSPATH -Djava.library.path=$JAVA_LIB_PATH -Dcute.args="$arguments" $SOURCE ;
ret=$?;
ret=$((ret&2));
if [[ ($ret -eq 2) ]]
then
exit
else
# echo "*********************** Input and Trace for Last Execution *****************************"
# java -ea -Xmx512m -Xms512m -classpath $CLASSPATH -Djava.library.path=$JAVA_LIB_PATH -Dcute.args="$arguments:-m:1:-t:512" $SOURCE
# echo "******************************************************************************"
echo -n ""
fi
i=$((i+1))
done