build.sh 249 B

123456789
  1. #!/bin/sh
  2. find ./src -name '*.hs' -printf '%T@ %p\n' \
  3. | sort -r | head -n1 | cut -d' ' -f2 | while read file
  4. do
  5. out_file="$(basename "$file" | cut -d'.' -f1)"
  6. echo "Compiling file '${file}' into '${out_file}'"
  7. ghc -o "$out_file" "$file"
  8. done