summaryrefslogtreecommitdiff
path: root/archweb.inc.sh
blob: 6075c410c19cb6b4d4f466b874c4c00e9ccc12df (plain)
1
2
3
4
archweb_get_pkgbase() {
  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)'
}