More fixes on lip

This commit is contained in:
Geoffrey Frogeye 2023-07-25 13:33:22 +02:00
parent d1ae06e7ef
commit 910e7fae63
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -6,14 +6,15 @@ url="https://ip.frogeye.fr/json"
cachedir="$HOME/.cache/lip"
ip="${1:-}"
if [ $# -gt 0 ]
jq_sel="del(.user_agent)"
if [ $# -gt 1 ]
then
shift
jq_sel="$@"
else
jq_sel="del(.user_agent)"
fi
if [ -n "$ip" ]
then
cachefile="$cachedir/$ip"