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
1 changed files with 2 additions and 3 deletions

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"
}