summaryrefslogtreecommitdiff
path: root/debian/patches/50-scripts.dpatch
blob: fd02f857fa273443603c782d7ae0a01a005ab84f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh /usr/share/dpatch/dpatch-run
## 50-scripts.dpatch by Andreas Putzo <andreas@putzo.net>
##
## DP: Fix path to osm.xml (Thanks Giovanni Mascellani)
## DP: Fix bashism in examples/wpget.

@DPATCH@
diff -urNad gpsdrive-2.10~pre4~/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py gpsdrive-2.10~pre4/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py
--- gpsdrive-2.10~pre4~/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py	2007-09-15 15:11:59.000000000 +0000
+++ gpsdrive-2.10~pre4/scripts/mapnik/gpsdrive_mapnik_gentiles-in.py	2008-07-15 17:37:07.000000000 +0000
@@ -166,7 +166,7 @@
 
     home = os.environ['HOME']
     data = "@DATA_DIR@/mapnik"
-    mapfile = data + "/osm.xml"
+    mapfile = home + "/.gpsdrive/osm.xml"
     tile_dir = home + "/.gpsdrive/maps/mapnik/"
     mapkoordfile = home + "/.gpsdrive/maps/map_koord.txt"
     
diff -urNad gpsdrive-2.10~pre4~/scripts/wpget gpsdrive-2.10~pre4/scripts/wpget
--- gpsdrive-2.10~pre4~/scripts/wpget	2007-09-14 21:47:07.000000000 +0000
+++ gpsdrive-2.10~pre4/scripts/wpget	2008-07-15 17:38:12.000000000 +0000
@@ -32,7 +32,7 @@
 done
 
 opt=${opt:= -w}
-if [[ ${#opt} != "3" && ${#opt} != "12" ]]; then
+if [ ${#opt} -ne 3 -a ${#opt} -ne 12 ]; then
 	echo "Usage: $0 [-r|--get-routes]|[-w|--get-waypts]|[-t|--get-tracks] [-d device|--device device]" >&2 ;
 	echo "defaults are: --get-waypts and --device /dev/gps" >&2 ;
 	exit 1 ;