From cdc83819f5019f4ccc4d244878d7ffaa1d914c9f Mon Sep 17 00:00:00 2001 From: Alad Wenter Date: Thu, 17 Mar 2016 02:27:46 +0300 Subject: [PATCH] Use pacman -Sp for figuring out the repo a package is in Signed-off-by: fbt --- prm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/prm b/prm index d01f8ec..a85a9c1 100755 --- a/prm +++ b/prm @@ -303,11 +303,7 @@ main() { if (( ! "$?" )); then repo='aur' else - while read -r; do - if [[ "$REPLY" =~ ^Repository ]]; then - repo="${REPLY##* }" - fi - done < <( pacman -Si "$package" ) + read -r repo < <( pacman -Sp --print-format '%r' ) [[ "$repo" ]] || { err "Can't find package %s\n" "$package"