From c2f25befa94871c796e9051ad45a8eb6e5c54ee7 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Thu, 17 Feb 2022 18:14:42 +0100 Subject: [PATCH] Make sb-doppler POSIX compliant --- .local/bin/statusbar/sb-doppler | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.local/bin/statusbar/sb-doppler b/.local/bin/statusbar/sb-doppler index cf765f6..dabf18b 100755 --- a/.local/bin/statusbar/sb-doppler +++ b/.local/bin/statusbar/sb-doppler @@ -232,14 +232,14 @@ radarcode=$(echo "$chosen" | sed "s/..: // ; s/:.*//") echo "$radarcode" | grep -q "^[A-Z]\+$" && printf "%s,%s\\n" "$continentcode" "$radarcode" > "$radarloc" ;} getdoppler() { - cont="$(cat "$radarloc" | sed "s/,.*//")" - loc="$(cat "$radarloc" | cut -c 4-)" + cont="$(sed "s/,.*//" "$radarloc")" + loc="$(cut -c 4- "$radarloc")" notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc." - if [ $cont == "US" ] ; then + if [ "$cont" = "US" ] ; then curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ; - elif [ $cont == "EU" ] ; then + elif [ "$cont" = "EU" ] ; then curl -sL "https://api.sat24.com/animated/${loc}/rainTMC/2/" > "$doppler" ; - elif [ $cont == "AF" ] ; then + elif [ "$cont" = "AF" ] ; then curl -sL "https://api.sat24.com/animated/${loc}/rain/2/" > "$doppler" ; fi }