From 910e7fae639555b04eb1e5303556a53cbf92cd0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Tue, 25 Jul 2023 13:33:22 +0200 Subject: [PATCH] More fixes on lip --- config/scripts/lip | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/scripts/lip b/config/scripts/lip index a30eee4..66a0b1d 100755 --- a/config/scripts/lip +++ b/config/scripts/lip @@ -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"