diff -r 4de31fdc0d67 -r b5b6ed38c2f2 mk_jars --- a/mk_jars Mon Nov 02 02:31:44 2020 +0000 +++ b/mk_jars Mon Nov 02 13:10:02 2020 +0000 @@ -1,13 +1,16 @@ #!/bin/sh set -e -for sd in solutions*; do +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 "$fl compiled to ${fl%".scala"}.jar" - scalac -d ${fl%".scala"}.jar $fl - echo "copied to ../templates${sd#"solutions"}/" - cp ${fl%".scala"}.jar ../templates${sd#"solutions"}/ + 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