Use pacman -Sp for figuring out the repo a package is in

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Alad Wenter 2016-03-17 02:27:46 +03:00 committed by fbt
parent 96b7584153
commit cdc83819f5

6
prm
View File

@ -303,11 +303,7 @@ main() {
if (( ! "$?" )); then if (( ! "$?" )); then
repo='aur' repo='aur'
else else
while read -r; do read -r repo < <( pacman -Sp --print-format '%r' )
if [[ "$REPLY" =~ ^Repository ]]; then
repo="${REPLY##* }"
fi
done < <( pacman -Si "$package" )
[[ "$repo" ]] || { [[ "$repo" ]] || {
err "Can't find package %s\n" "$package" err "Can't find package %s\n" "$package"