Advertisement
Guest User

openmtbmap-download

a guest
Mar 25th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #!/bin/bash
  2. # config
  3. #DIR="http://openmtbmap.x-nation.de/maps/germany"
  4. DIR="ftp://ftp5.gwdg.de/pub/misc/openstreetmap/openmtbmap/germany"
  5. FILE="mtbbayern.exe"
  6.  
  7. cd ~/gps/maps/mtbbayern
  8.  
  9. ts_old=`stat -c %Y $FILE || echo $?`
  10. wget -N $DIR/$FILE
  11. ts_new=`stat -c %Y $FILE || echo $?`
  12. moddate=`date -r $FILE +"%m%d"`
  13.  
  14. if [ $ts_old -lt $ts_new ] || [ $1 = "-f" ] ; then
  15.   ~/gps/scripts/mkgmapLatest.sh
  16.   7z e -y $FILE
  17.   java -jar ~/gps/mkgmap-*/mkgmap.jar -c ~/gps/.config/mkgmap_by.txt \
  18.     --product-id=$moddate --mapname=omm-by-$moddate \
  19.     --description=omm-by-$moddate widedby.TYP 6526*.img
  20.   mv gmapsupp.img mtbbayern-$moddate.img
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement