Created
July 25, 2010 20:42
-
-
Save timabell/489870 to your computer and use it in GitHub Desktop.
convert new tango files to gpx files - tango2gpx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# convert new tango files to gpx files | |
# relies on convert2gpx to do actual conversion http://www.tangogps.org/downloads/convert2gpx.pl | |
# folder layout: | |
# first arg - source files from tangogps logging | |
# second arg - output folder | |
input="$1" | |
output="$2" | |
for src in `cd "$input" && ls *.log | sort`; | |
do | |
# echo "looking for $output/$src.gpx" | |
dst="$output/$src.gpx" | |
if [ -f "$dst" ] | |
then | |
echo "ignoring exisiting file $src" | |
else | |
echo "processing new file $src" | |
./convert2gpx > "$dst" < "$input/$src" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment