v.in.gps_test.sh 719 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # v.in.garmin and v.in.gpsbabel test script
  3. # by Hamish Bowman 18 May 2007 ; public domain
  4. # assumes downloading from a garmin on port /dev/gps
  5. for PGM in garmin gpsbabel ; do
  6. for DO_PTS in pts lines ; do
  7. for TASK in w t r ; do
  8. if [ $TASK = w ] && [ $DO_PTS = "lines" ] ; then
  9. continue
  10. fi
  11. if [ $DO_PTS = "pts" ] ; then
  12. PTFLAG="-p"
  13. else
  14. PTFLAG=""
  15. fi
  16. MAPNAME="test_${PGM}_${TASK}_${DO_PTS}_$$"
  17. echo "-- Running [v.in.$PGM] for [$TASK] download as [$DO_PTS] into <$MAPNAME> --"
  18. v.in.$PGM -$TASK $PTFLAG out="$MAPNAME"
  19. if [ $? -ne 0 ] ; then
  20. exit 1
  21. fi
  22. awk 'BEGIN {printf("\n\n\n\n")}'
  23. done
  24. done
  25. done