#!/bin/bash # # # Add your map sources here, don't forget to increase the array counter index! #MAP[0]="http://download.osmand.net/download.php?standard=yes&file=Georgian_wiki_2.obf.zip" MAP[1]="http://download.osmand.net/download.php?standard=yes&file=German_wiki_2.obf.zip" MAP[2]="http://download.osmand.net/download.php?standard=yes&file=Germany_addresses-nationwide_europe_2.obf.zip" MAP[3]="http://download.osmand.net/download.php?standard=yes&file=Germany_baden-wuerttemberg_europe_2.obf.zip" MAP[4]="http://download.osmand.net/download.php?standard=yes&file=Germany_bayern_europe_2.obf.zip" MAP[5]="http://download.osmand.net/download.php?standard=yes&file=Germany_berlin_europe_2.obf.zip" MAP[6]="http://download.osmand.net/download.php?standard=yes&file=Germany_brandenburg_europe_2.obf.zip" MAP[7]="http://download.osmand.net/download.php?standard=yes&file=Germany_bremen_europe_2.obf.zip" MAP[8]="http://download.osmand.net/download.php?standard=yes&file=Germany_hamburg_europe_2.obf.zip" MAP[9]="http://download.osmand.net/download.php?standard=yes&file=Germany_hessen_europe_2.obf.zip" MAP[10]="http://download.osmand.net/download.php?standard=yes&file=Germany_mecklenburg-vorpommern_europe_2.obf.zip" MAP[11]="http://download.osmand.net/download.php?standard=yes&file=Germany_niedersachsen_europe_2.obf.zip" MAP[12]="http://download.osmand.net/download.php?standard=yes&file=Germany_nordrhein-westfalen_europe_2.obf.zip" MAP[13]="http://download.osmand.net/download.php?standard=yes&file=Germany_rheinland-pfalz_europe_2.obf.zip" MAP[14]="http://download.osmand.net/download.php?standard=yes&file=Germany_saarland_europe_2.obf.zip" MAP[15]="http://download.osmand.net/download.php?standard=yes&file=Germany_sachsen-anhalt_europe_2.obf.zip" MAP[16]="http://download.osmand.net/download.php?standard=yes&file=Germany_sachsen_europe_2.obf.zip" MAP[17]="http://download.osmand.net/download.php?standard=yes&file=Germany_schleswig-holstein_europe_2.obf.zip" MAP[18]="http://download.osmand.net/download.php?standard=yes&file=Germany_thueringen_europe_2.obf.zip" MAP[19]="http://download.osmand.net/download.php?standard=yes&file=Denmark_europe_2.obf.zip" clear echo "Start downloading new maps from \"osmand.net\"" echo "---------------------------------------------------" for (( i=1; i<=19; i++ )) do # extract filename from URL: filename=`echo "${MAP[$i]}" | cut -d"=" -f3` if [ -e $filename ]; then rm $filename else : fi echo -n "Processing: \"$filename\" ... Downloading ... " wget --quiet -O "$filename" "${MAP[$i]}" echo -n "done -> " echo -n "Extracting map from ZIP-file ... " unzip -o -qq $filename && rm $filename echo "done" done echo "" echo "---------------------------------------------------" echo "Download process finished!" echo ""