update_garmin|neu packen mit tar/bz2
This commit is contained in:
@@ -3,29 +3,41 @@
|
||||
set -x
|
||||
|
||||
LocalDir=/dat/gps/garmin
|
||||
Downloadfile=gmapsupp.img.bz2
|
||||
Garminfile=gmapsupp.img
|
||||
Downloadfile=$Garminfile.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_
|
||||
TmpFile=tmp
|
||||
|
||||
[ -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
|
||||
TarFile=../$TarFileName_d$datestr.tar.bz2
|
||||
if [ ! -f $TarFile ]; then
|
||||
tar -cf $TarFile gmapsupp.img.bz2
|
||||
nice -n 19 cp $Downloadfile $TmpFile.bz2
|
||||
nice -n 19 bunzip2 $TmpFile.bz2
|
||||
mv $TmpFile $Garminfile
|
||||
nice -n 19 tar -cjf $TarFile $Garminfile
|
||||
nice -n 19 rm $Garminfile
|
||||
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
|
||||
TarFile=../$TarFileName_eur$datestr.tar.bz2
|
||||
if [ ! -f $TarFile ]; then
|
||||
tar -cf $TarFile gmapsupp.img.bz2
|
||||
nice -n 19 cp $Downloadfile $TmpFile.bz2
|
||||
nice -n 19 bunzip2 $TmpFile.bz2
|
||||
mv $TmpFile $Garminfile
|
||||
nice -n 19 tar -cjf $TarFile $Garminfile
|
||||
nice -n 19
|
||||
rm $Garminfile
|
||||
#tar -cf $TarFile gmapsupp.img.bz2
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user