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

#!/bin/sh
set -e

subdirs=${1:-"pre_solution1 pre_solution2 pre_solution3 pre_solution4 main_solution1 main_solution2 main_solution3 main_solution4 main_solution5"} 

for sd in $subdirs; do
  cd $sd
  for fl in *.scala; do
      echo "$sd/$fl"
      echo "copy to ${sd/solution/templates}/${fl%.scala}.jar"
      scalac -d ${fl%.scala}.jar $fl
      cp ${fl%.scala}.jar "../${sd/solution/templates}"
      hg add "../${sd/solution/templates}/${fl%.scala}.jar"
  done
  cd ..
done