|
|
@ -1,16 +1,19 @@ |
|
|
|
#!/bin/bash |
|
|
|
#!/bin/sh |
|
|
|
|
|
|
|
default="EVX" |
|
|
|
# 'default' string is unused right now. might do defaults with a small config file... |
|
|
|
# CONFIG |
|
|
|
default_area="EVX" # default city/area to use if none is specified |
|
|
|
default_viewer="nomacs" # default image veiwer (change reccomended) |
|
|
|
|
|
|
|
if [ "$1" == list ]; then |
|
|
|
# ---------------------------- |
|
|
|
if [ "$1" = list ]; then |
|
|
|
curl https://pastebin.com/raw/S7QdSXMi |
|
|
|
printf "\n" |
|
|
|
elif [ -z "$1" ]; then |
|
|
|
echo "no area selected, run 'radar list' to list areas." |
|
|
|
wget https://radar.weather.gov/lite/N0R/"$default_area"_loop.gif |
|
|
|
"$default_viewer" "$default_area"_loop.gif |
|
|
|
rm -f "$default_area"_loop.gif |
|
|
|
elif [ "$1" != list ]; then |
|
|
|
wget https://radar.weather.gov/lite/N0R/$1_loop.gif |
|
|
|
# this script uses 'nomacs' for image veiwing, but you can change it to whatever image veiwer you use. |
|
|
|
nomacs $1_loop.gif |
|
|
|
rm -f $1_loop.gif |
|
|
|
wget https://radar.weather.gov/lite/N0R/"$1"_loop.gif |
|
|
|
"$default_viewer" "$1"_loop.gif |
|
|
|
rm -f "$1"_loop.gif |
|
|
|
fi |