mk_jars
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 06 Jun 2024 22:18:15 +0100
changeset 490 4778fefecd0c
parent 477 a4e1f63157d8
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
355
bc3980949af2 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 349
diff changeset
     1
#!/bin/bash
296
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
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 414
diff changeset
     4
subdirs=${1:-"core_solution1 core_solution2 core_solution3 main_solution2 main_solution3 main_solution4 main_solution5"} 
348
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}"
414
59eeb22c9229 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 408
diff changeset
    13
      hg add -q "../${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
349
682611a0fb89 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
    17
682611a0fb89 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
    18
hg commit -m "updated jars"
682611a0fb89 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
    19
682611a0fb89 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
    20
# producing solutions and templates
682611a0fb89 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
    21
# tar -zxvf templates.tgz pre_templates* main_templates*
682611a0fb89 updated jars
Christian Urban <christian.urban@kcl.ac.uk>
parents: 348
diff changeset
    22
# tar -zcvf templates.tgz pre_templates* main_templates*