Skip to content

Instantly share code, notes, and snippets.

@dhicks
Created October 21, 2018 00:29
Show Gist options
  • Save dhicks/3c6901260008dd353771bc2bdd278985 to your computer and use it in GitHub Desktop.
Save dhicks/3c6901260008dd353771bc2bdd278985 to your computer and use it in GitHub Desktop.
This bash script synchronizes AlpineQuest tracks using rsync, then converts them to gpx
#!/bin/bash
## This script synchronizes AlpineQuest tracks using rsync, then converts them to gpx
RED='\033[0;31m'
NC='\033[0m'
echo -e "${RED}Make sure SSHDroid is running before using this script${NC}"
startfolder="$PWD"
## SSHDroid: <https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroid&hl=en_US>
apqfolder="/Users/danhicks/Google Drive/hiking/GPS tracks/AlpineQuest conversion/AlpineQuest sync"
cd "$apqfolder"
#echo $PWD
rsync --protect-args -avHPe "ssh -p 2222" "[email protected]:/storage/emulated/0/alpinequest/landmarks/Recorded tracks/" "."
## Conversion uses the Perl script available here: <https://github.com/phkehl/apq2gpx>
../apq2gpx/apq2gpx.pl -g -o ../gpx/ *.trk
cd "$startfolder"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment