Make sb-doppler POSIX compliant
This commit is contained in:
parent
c16d6fd3b0
commit
c2f25befa9
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue