Skip to content

Instantly share code, notes, and snippets.

@mrvanes
Created February 21, 2019 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrvanes/02e0cb4ca8bd1ce689506bba616fd689 to your computer and use it in GitHub Desktop.
Save mrvanes/02e0cb4ca8bd1ce689506bba616fd689 to your computer and use it in GitHub Desktop.
download_roads
#!/bin/bash
URL='http://download.osmand.net/download?standard=yes&file='
for MAP in *.obf; do
MAPFILE=${MAP#./}
MAPNAME=${MAPFILE%.road.obf}
echo $MAPNAME
DLMAP=${MAPNAME}_2.road.obf.zip
DLURL=${URL}${DLMAP}
wget $DLURL -O $DLMAP
unzip $DLMAP
mv ${MAPNAME}_2.road.obf ${MAPNAME}.road.obf
rm $DLMAP
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment