elm/bin/build.sh
2016-02-22 20:29:13 -07:00

13 lines
520 B
Bash
Executable file

for example_file in exercises/**/*.example
do
exercise_dir=$(dirname $example_file)
exercise=$(basename $example_file .example)
echo 'setting up .....'
mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.impl"
mv "$exercise_dir/$exercise.example" "$exercise_dir/$exercise.elm"
echo 'building .....'
elm-test exercises/**/*Tests.elm
echo 'tearing down .....'
mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.example"
mv "$exercise_dir/$exercise.impl" "$exercise_dir/$exercise.elm"
done