archlinux: fix pacweb breaking when multiple packages found (#9059)

Co-authored-by: Magnus Boman <Kattus@users.noreply.github.com>
This commit is contained in:
Magnus Boman 2020-06-23 17:57:04 +02:00 committed by GitHub
parent b706a91917
commit cea89f5439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,8 +212,8 @@ if (( $+commands[xdg-open] )); then
if [[ -z "$infos" ]]; then
return
fi
repo="$(grep '^Repo' <<< "$infos" | grep -oP '[^ ]+$')"
arch="$(grep '^Arch' <<< "$infos" | grep -oP '[^ ]+$')"
repo="$(grep -m 1 '^Repo' <<< "$infos" | grep -oP '[^ ]+$')"
arch="$(grep -m 1 '^Arch' <<< "$infos" | grep -oP '[^ ]+$')"
xdg-open "https://www.archlinux.org/packages/$repo/$arch/$pkg/" &>/dev/null
}
fi