diff options
author | mvglasow <michael@vonglasow.com> | 2019-08-31 23:34:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-31 23:34:33 +0300 |
commit | 0664e46e222f5cbc5f4ec7d155ef43255320cfb5 (patch) | |
tree | a0ad6baf6adddaa5afb62df585925969e9e87566 | |
parent | 7f1dbde52429fab3d7ad37b1ce8ecf86143228d1 (diff) | |
parent | 848425f4a3cc9b163fcf71dc3c4862e4cbb70970 (diff) | |
download | navit-0664e46e222f5cbc5f4ec7d155ef43255320cfb5.tar.gz |
Merge branch 'trunk' into bike
-rw-r--r-- | navit/navit_shipped.xml | 2 | ||||
-rwxr-xr-x | navit/script/cabify.sh | 3 | ||||
-rwxr-xr-x | navit/startonce.sh | 20 | ||||
-rwxr-xr-x | navit/tools/cleanattr.sh | 9 | ||||
-rw-r--r-- | scripts/basic_upload_apks.py | 1 |
5 files changed, 15 insertions, 20 deletions
diff --git a/navit/navit_shipped.xml b/navit/navit_shipped.xml index a1843e9e7..5473349c7 100644 --- a/navit/navit_shipped.xml +++ b/navit/navit_shipped.xml @@ -417,7 +417,7 @@ Waypoint</text></img> <xi:include href="$NAVIT_SHAREDIR/maps/*.xml"/> </mapset> - <!-- Mapset template for openstreetmaps --> + <!-- Mapset template for OpenStreetMap --> <mapset enabled="no"> <map type="binfile" enabled="yes" data="/media/mmc2/MapsNavit/osm_europe.bin"/> </mapset> diff --git a/navit/script/cabify.sh b/navit/script/cabify.sh index ea6dba4b4..98a475072 100755 --- a/navit/script/cabify.sh +++ b/navit/script/cabify.sh @@ -2,8 +2,7 @@ function check_pocketcab() { - which pocketpc-cab &> /dev/null - if [ $? -ne 0 ] + if ! which pocketpc-cab &> /dev/null then echo "You don't have pocketpc-cab installed or not in PATH" exit diff --git a/navit/startonce.sh b/navit/startonce.sh index 3e27d77f0..04220b33b 100755 --- a/navit/startonce.sh +++ b/navit/startonce.sh @@ -21,9 +21,8 @@ NAVIT="./navit" function check_wmctrl() { - which wmctrl > /dev/null - - if [ $? -ne 0 ] ; then + if ! which wmctrl > /dev/null + then echo "I need the 'wmctrl' program. Exit." exit 1 fi @@ -39,9 +38,8 @@ function start_navit() pid=$! - echo -n "$pid" > $PIDFILE - - if [ $? -eq 0 ] ; then + if ! echo -n "$pid" > $PIDFILE + then echo "Started navit with PID $pid." else kill $pid @@ -59,12 +57,12 @@ function check_navit() { if [ -f $PIDFILE ] ; then pid=$(cat $PIDFILE) - kill -0 $pid 2>/dev/null - if [ $? -eq 0 ] ; then - echo "Bringing Navit to front" + if ! kill -0 $pid 2>/dev/null + then + echo "Bringing Navit to front" - winid=$(wmctrl -l -p | grep -e "^[^:blank:]*[:blank:]*[^:blank:]*[:blank:]*$pid[:blank:]*" | sed 's/ .*//') - wmctrl -i -R $winid + winid=$(wmctrl -l -p | grep -e "^[^:blank:]*[:blank:]*[^:blank:]*[:blank:]*$pid[:blank:]*" | sed 's/ .*//') + wmctrl -i -R $winid exit 0 fi diff --git a/navit/tools/cleanattr.sh b/navit/tools/cleanattr.sh index 200db5b66..c5e36792a 100755 --- a/navit/tools/cleanattr.sh +++ b/navit/tools/cleanattr.sh @@ -20,8 +20,8 @@ if [ -f $TMPFILE ] ; then exit 1; fi -touch $TMPFILE -if [ $? -ne 0 ] ; then +if ! touch $TMPFILE +then echo "Could not write to temporary file $TEMPFILE." echo "Please make sure you have write access to the temporary directory." exit 1; @@ -35,9 +35,8 @@ cp $ATTRFILE $TMPFILE for ATTRNAME in $ATTRLIST ; do ATTR="attr_$ATTRNAME" - grep -rI $ATTR ./* > /dev/null - - if [ $? -ne 0 ] ; then + if ! grep -rI $ATTR ./* > /dev/null + then echo "Unused attribute: $ATTR" grep -v "ATTR($ATTRNAME)" $TMPFILE > $TMPFILE2 mv $TMPFILE2 $TMPFILE diff --git a/scripts/basic_upload_apks.py b/scripts/basic_upload_apks.py index b4b439536..1bd911f15 100644 --- a/scripts/basic_upload_apks.py +++ b/scripts/basic_upload_apks.py @@ -79,4 +79,3 @@ def main(argv): if __name__ == '__main__': main(sys.argv) - |