equal
deleted
inserted
replaced
1 #!/bin/bash |
1 #!/bin/bash |
2 set -euo pipefail |
2 set -euo pipefail |
3 |
3 |
4 trap "exit" INT |
4 trap "exit" INT |
5 |
5 |
6 files=${1:-assignment2019scala-*/Part7} |
6 files=${1:-assignment2019scala-*} |
7 |
7 |
8 function scala_compile { |
8 function scala_compile { |
9 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2>> /dev/null 1>> /dev/null) |
9 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2>> /dev/null 1>> /dev/null) |
10 } |
10 } |
11 |
11 |
12 for sd in $files; do |
12 for sd in $files; do |
13 cd $sd |
13 cd $sd/Part7 |
14 echo $sd |
14 echo $sd |
15 if (scala_compile docdiff.scala) |
15 if (scala_compile docdiff.scala) |
16 then |
16 then |
17 scalac -g:notailcalls -d docdiff-decompiled.jar docdiff.scala |
17 scalac -g:notailcalls -d docdiff-decompiled.jar docdiff.scala |
18 java -jar ~/pep-material/procyon-decompiler-0.5.36.jar -ln -jar docdiff-decompiled.jar -o . |
18 java -jar ~/pep-material/procyon-decompiler-0.5.36.jar -ln -jar docdiff-decompiled.jar -o . |
19 rm CW7a.java |
19 rm CW7a.java |
20 mv CW7a$.java CW7a.java |
20 mv CW7a$.java $sd-CW7a.java |
21 else |
21 else |
22 echo -e " --> SCALA DID NOT RUN docdiff.scala" |
22 echo -e " --> SCALA DID NOT RUN docdiff.scala" |
23 fi |
23 fi |
24 cd .. |
24 cd .. |
25 cd .. |
25 cd .. |