build.sh 477 B

12345678910111213141516
  1. #!/bin/sh
  2. find ./src -name '*.erl' -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 "------------------------------------"
  7. echo "Compiling file '${file}' into '${out_file}'"
  8. (
  9. set -x
  10. time dialyzer -Wno_unknown --src "$file" || exit 1
  11. erlc -Wall -Werror "$file"
  12. )
  13. echo "------------------------------------"
  14. done