summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorkrisdoodle45 <86745210+krisdoodle45@users.noreply.github.com>2022-02-17 18:14:42 +0100
committerGitHub <noreply@github.com>2022-02-17 18:14:42 +0100
commitc2f25befa94871c796e9051ad45a8eb6e5c54ee7 (patch)
tree31048e7fea14f5ff0df647dae7a38916dba9cef9 /.local
parentc16d6fd3b04670b2ae1315cfbc5dd6b53d44d0c5 (diff)
downloadeibhear-c2f25befa94871c796e9051ad45a8eb6e5c54ee7.tar.gz
eibhear-c2f25befa94871c796e9051ad45a8eb6e5c54ee7.tar.zst
eibhear-c2f25befa94871c796e9051ad45a8eb6e5c54ee7.zip
Make sb-doppler POSIX compliant
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/statusbar/sb-doppler10
1 files 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
}