genboards.sh 310 B

123456789101112131415161718
  1. #!/bin/bash
  2. if [ $# -eq 0 ]
  3. then
  4. find . -name board.fmpp -exec bash genboards.sh '{}' \;
  5. elif [ $# -eq 1 ]
  6. then
  7. path=$(readlink -f $(dirname $1))
  8. echo "Processing: $1"
  9. cd $path
  10. if ! fmpp -q -C board.fmpp
  11. then
  12. echo
  13. echo "aborted"
  14. exit 1
  15. fi
  16. else
  17. echo "illegal number of arguments"
  18. fi