index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/wtf | 12 |
@@ -2,7 +2,9 @@ # shellcheck disable=SC2119,SC2120 -wget -qO- 'https://pkgapi.arch32.tyzoid.com/esearch/'"$*"'.xml' | \ +search="$*" + +wget -qO- 'https://pkgapi.arch32.tyzoid.com/esearch/'"${search##*/}"'.xml' | \ awk ' BEGIN { package=""; @@ -35,4 +37,10 @@ wget -qO- 'https://pkgapi.arch32.tyzoid.com/esearch/'"$*"'.xml' | \ file[++filelen] = gensub(/<[^>]+>/, "", "g", $1); } } - ' + ' | \ + if printf '%s\n' "${search}" | \ + grep -q '/'; then + grep -w "${search}" || true + else + cat + fi |