You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
580 B

  1. #!/bin/sh
  2. set -e
  3. if [ ! -x ./main ]; then
  4. make main
  5. fi
  6. if [ "$1" = "" ]; then
  7. echo "Usage: $0 <directory>"
  8. exit 1
  9. fi
  10. if [ ! -d "$1" ]; then
  11. echo "$0: $1 is not a directory"
  12. exit 1
  13. fi
  14. find $1 -type f | while read i; do
  15. OUTPUT="$(echo "$i" | tr -d / | sed 's/^[.]*//')-raster.txt"
  16. echo "$0: outputting to $OUTPUT"
  17. if [ -f "$OUTPUT" ]; then
  18. echo "$0: file already exists, skipping"
  19. continue
  20. fi
  21. touch "$OUTPUT"
  22. ./main -6 "$i" | tee -a "$OUTPUT" | while read line; do
  23. echo -n .
  24. done
  25. echo "done."
  26. done