index : asp32 | |
Archlinux32 fork of asp - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archweb.inc.sh | 9 |
diff --git a/archweb.inc.sh b/archweb.inc.sh index 15f0442..dbe36a5 100644 --- a/archweb.inc.sh +++ b/archweb.inc.sh @@ -1,9 +1,4 @@ archweb_get_pkgbase() { - local pkgbase - - pkgbase=$(curl -s "https://www.archlinux.org/packages/search/json/?q=$1" | - jq -r --arg pkgname "$1" 'limit(1; .results[] | select(.pkgname == $pkgname).pkgbase)') - [[ $pkgbase ]] || return - - printf '%s\n' "$pkgbase" + curl -s "https://www.archlinux.org/packages/search/json/?q=$1" | + jq -er --arg pkgname "$1" 'limit(1; .results[] | select(.pkgname == $pkgname).pkgbase)' } |