local/bin/weather: Fall back on wget if curl is missing
parent
0cd8a1acac
commit
1710cf17d0
|
@ -12,4 +12,10 @@ EOF
|
|||
exit
|
||||
fi
|
||||
|
||||
curl wttr.in/"$1"
|
||||
agent=curl
|
||||
agent_flags=""
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
agent=wget
|
||||
agent_flags="-q -O -"
|
||||
fi
|
||||
$agent $agent_flags wttr.in/"$1"
|
||||
|
|
Loading…
Reference in New Issue