mk_jars
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 02 Nov 2020 13:10:02 +0000
changeset 348 b5b6ed38c2f2
parent 297 eab44dbee855
child 349 682611a0fb89
permissions -rwxr-xr-x
updated jars
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
296
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#!/bin/sh
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
set -e
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
348
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
     4
subdirs=${1:-"pre_solution1 pre_solution2 pre_solution3 pre_solution4 main_solution1 main_solution2 main_solution3 main_solution4 main_solution5"} 
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
     5
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
     6
for sd in $subdirs; do
296
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  cd $sd
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  for fl in *.scala; do
348
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
     9
      echo "$sd/$fl"
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
    10
      echo "copy to ${sd/solution/templates}/${fl%.scala}.jar"
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
    11
      scalac -d ${fl%.scala}.jar $fl
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
    12
      cp ${fl%.scala}.jar "../${sd/solution/templates}"
b5b6ed38c2f2 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 297
diff changeset
    13
      hg add "../${sd/solution/templates}/${fl%.scala}.jar"
296
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  done
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  cd ..
12dc251fc47e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
done