From bd3f96a5171cf797bf8ba59601a1a767ed036a05 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Wed, 4 Apr 2018 09:27:26 +0200 Subject: urlencode query param in archweb requests Some packages, e.g. libsigc++-docs, needs to be properly hex-escaped. --- archweb.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archweb.inc.sh') diff --git a/archweb.inc.sh b/archweb.inc.sh index dbe36a5..6075c41 100644 --- a/archweb.inc.sh +++ b/archweb.inc.sh @@ -1,4 +1,4 @@ archweb_get_pkgbase() { - curl -s "https://www.archlinux.org/packages/search/json/?q=$1" | + curl -Gs "https://www.archlinux.org/packages/search/json/" --data-urlencode "q=$1" | jq -er --arg pkgname "$1" 'limit(1; .results[] | select(.pkgname == $pkgname).pkgbase)' } -- cgit v1.2.3-54-g00ecf