mk_jars
author Christian Urban <christian.urban@kcl.ac.uk>
Sat, 11 Mar 2023 23:10:52 +0000
changeset 466 342dcfcea0f7
parent 414 59eeb22c9229
child 477 a4e1f63157d8
permissions -rwxr-xr-x
added jar files

#!/bin/bash
set -e

subdirs=${1:-"core_solution1 core_solution2 core_solution3 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 -q "../${sd/solution/templates}/${fl%.scala}.jar"
  done
  cd ..
done

hg commit -m "updated jars"

# producing solutions and templates
# tar -zxvf templates.tgz pre_templates* main_templates*
# tar -zcvf templates.tgz pre_templates* main_templates*