equal
deleted
inserted
replaced
|
1 #!/bin/bash |
|
2 set -euo pipefail |
|
3 |
|
4 trap "exit" INT |
|
5 |
|
6 files=${1:-assignment2019scala-*/Part7} |
|
7 |
|
8 function scala_compile { |
|
9 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2>> /dev/null 1>> /dev/null) |
|
10 } |
|
11 |
|
12 for sd in $files; do |
|
13 cd $sd |
|
14 echo $sd |
|
15 if (scala_compile docdiff.scala) |
|
16 then |
|
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 . |
|
19 rm CW7a.java |
|
20 mv CW7a$.java CW7a.java |
|
21 else |
|
22 echo -e " --> SCALA DID NOT RUN docdiff.scala" |
|
23 fi |
|
24 cd .. |
|
25 cd .. |
|
26 done |
|
27 |
|
28 |