Zsh: Switch to curl

This commit is contained in:
theanonymousexyz 2022-04-03 21:46:06 +02:00
parent 3185a5bbf0
commit 4a403c123c
No known key found for this signature in database
GPG key ID: 35EE09F5481049BB

View file

@ -8,8 +8,7 @@ doasedit() {
}
get_ip() {
(( ${+commands[wget]} )) || return 1
(( ${+commands[jq]} )) && local JQ="| jq"
local IP=""
local ARGS=""
@ -18,5 +17,5 @@ get_ip() {
shift
done
eval "wget $ARGS -qO- 'https://ifconfig.co/json$IP'"
eval "curl $ARGS -fsSL 'https://ifconfig.co/json$IP' $JQ"
}