From 46a8999e0f6e4275ffe44a4cc16cf77b679908d6 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sun, 28 Jun 2020 09:20:45 -0500 Subject: [PATCH] Fix gps location setting bug --- scripts/core/sxmo_gpsutil.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/core/sxmo_gpsutil.sh b/scripts/core/sxmo_gpsutil.sh index 9c19a5a..1d6f423 100755 --- a/scripts/core/sxmo_gpsutil.sh +++ b/scripts/core/sxmo_gpsutil.sh @@ -84,10 +84,10 @@ gpslatlonget() { echo "$LAT" "$LON" "$ZOOM" } gpslatlonset() { - CORDS="$(echo "$@" | tr -d ',°')" - LAT="$(echo "$CORDS" | cut -d' ' -f1)" - LON="$(echo "$CORDS" | cut -d' ' -f2)" - ZOOM="$(echo "$CORDS" | cut -d' ' -f3)" + COORDS="$(echo "$@" | tr -d ',°' | awk '{$1=$1};1')" + LAT="$(echo "$COORDS" | cut -d' ' -f1)" + LON="$(echo "$COORDS" | cut -d' ' -f2)" + ZOOM="$(echo "$COORDS" | cut -d' ' -f3)" [ -z "$ZOOM" ] && ZOOM=10 WINW="$( xwininfo -id "$(xdotool getactivewindow)" | grep -E '^\s*Width' | cut -d: -f2