Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archweb.inc.sh
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-04-04 09:27:26 +0200
committerDave Reisner <dreisner@archlinux.org>2018-04-04 10:58:20 -0400
commitbd3f96a5171cf797bf8ba59601a1a767ed036a05 (patch)
treed4c092b6c731d1b543ffca1046cc4b381343bd98 /archweb.inc.sh
parentebd0cbc396931c853f68b62132d2536b1bdafe5a (diff)
urlencode query param in archweb requests
Some packages, e.g. libsigc++-docs, needs to be properly hex-escaped.
Diffstat (limited to 'archweb.inc.sh')
-rw-r--r--archweb.inc.sh2
1 files changed, 1 insertions, 1 deletions
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)'
}