cleanup
This commit is contained in:
parent
304e61574e
commit
7a2f5d5930
24 changed files with 123 additions and 63 deletions
|
@ -72,8 +72,8 @@ _tz() {
|
|||
mapfile -t if < <(ip -j route show default | jq -r '.[] | .prefsrc, .dev')
|
||||
if ! [ -s "$f" ] || [ "${if[0]}" != "$(< ip)" ]; then
|
||||
echo "${if[0]}" > ip
|
||||
if j="$(curl -s 'https://ipapi.co/json')"; then
|
||||
jq -r '.timezone, "\(.latitude):\(.longitude)"' <<< "$j" > "$f"
|
||||
if j="$(curl -s 'https://api.ipbase.com/v2/info')"; then
|
||||
jq -r '.[] | .timezone.id, (.location |"\(.latitude):\(.longitude)" )' <<< "$j" > "$f"
|
||||
head -1 "$f"
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue