index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-28 14:14:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-28 14:14:23 +0200 |
commit | 883e34b80449282ecbb8fd4b1717b32c56163e89 (patch) | |
tree | 33ecf0028d20eb588e164555131b51da5e534558 /bin | |
parent | d749b217cbce706aca19a16a5a93f0e2f670bd3c (diff) |
-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 |