diff --git a/Exercises/exercise-6/.gitignore b/Exercises/exercise-6/.gitignore new file mode 100644 index 0000000..2211df6 --- /dev/null +++ b/Exercises/exercise-6/.gitignore @@ -0,0 +1 @@ +*.txt diff --git a/Exercises/exercise-6/build.sh b/Exercises/exercise-6/build.sh new file mode 100755 index 0000000..f11bad2 --- /dev/null +++ b/Exercises/exercise-6/build.sh @@ -0,0 +1,7 @@ +for shape in "shape1" "shape2" "shape3" "iShape" "disc50" +do + pushd "${BASH_SOURCE%/*}" > /dev/null + ghc ./Shapes.hs -e "render 100 100 $shape" + mv shape.txt "$shape.txt" + popd > /dev/null +done diff --git a/Exercises/exercise-6/watch.sh b/Exercises/exercise-6/watch.sh new file mode 100755 index 0000000..fd3a954 --- /dev/null +++ b/Exercises/exercise-6/watch.sh @@ -0,0 +1,10 @@ +pushd "${BASH_SOURCE%/*}" > /dev/null + +nix-shell -p entr bash --run \ + "ls *.hs | \ + entr -rs ' \ + ./build.sh + ' \ + " + +popd > /dev/null