elm/bin/build.sh
2016-02-27 10:45:34 -07:00

12 lines
535 B
Bash
Executable file

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