update_garmin hinzu
This commit is contained in:
2
update_garmin
Normal file
2
update_garmin
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
3:q
|
||||||
|
|
||||||
32
update_garmin.sh
Normal file
32
update_garmin.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
LocalDir=/dat/gps/garmin
|
||||||
|
Downloadfile=gmapsupp.img.bz2
|
||||||
|
url_d=http://www.juergen-frank.de/osm/gmapsupps/germany/$Downloadfile
|
||||||
|
url_eur=http://www.juergen-frank.de/osm/gmapsupps/europe/$Downloadfile
|
||||||
|
TarFileName_d=garmin_allinone_d_
|
||||||
|
TarFileName_eur=garmin_allinone_eur_
|
||||||
|
|
||||||
|
[ -e $LocalDir/d ] || mkdir $LocalDir/d
|
||||||
|
cd $LocalDir/d
|
||||||
|
wget -N $url_d
|
||||||
|
# Tar File to add the date of creation to the filenamr
|
||||||
|
datestr=$(stat -c %y $Downloadfile | cut -f 1 -d ' ')
|
||||||
|
TarFile=../$TarFileName_d$datestr.tar
|
||||||
|
if [ ! -f $TarFile ]; then
|
||||||
|
tar -cf $TarFile gmapsupp.img.bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -e $LocalDir/eur ] || mkdir $LocalDir/eur
|
||||||
|
cd $LocalDir/eur
|
||||||
|
wget -N $url_eur
|
||||||
|
datestr=$(stat -c %y $Downloadfile | cut -f 1 -d ' ')
|
||||||
|
TarFile=../$TarFileName_eur$datestr.tar
|
||||||
|
if [ ! -f $TarFile ]; then
|
||||||
|
tar -cf $TarFile gmapsupp.img.bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user