From 389b168e63a5bba2370057a2101f43de94961fa2 Mon Sep 17 00:00:00 2001 From: tuxce Date: Tue, 15 Jun 2010 12:24:05 +0200 Subject: [PATCH] Support 'pkgfile -l repo/pkg' --- scripts/pkgfile | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/pkgfile b/scripts/pkgfile index 95fe1f6..bb0ac41 100755 --- a/scripts/pkgfile +++ b/scripts/pkgfile @@ -267,10 +267,11 @@ search () { # listfiles() {{{ listfiles () { - local pkg="$1" + local _repo="" + [[ "$1" != "${1///}" ]] && _repo="${1%/*}" + local pkg="${1#*/}" local FOUNDFILE=0 - - if (( ! REMOTE_SEARCH )); then + if (( ! REMOTE_SEARCH )) && [[ ! $_repo ]]; then if pacman -Q "$pkg" &> /dev/null; then if (( ! BINARIES )); then pacman -Ql "$pkg" @@ -284,6 +285,7 @@ listfiles () { cd_filelist_dir noempty pkg_escaped=$(regex_escape "$pkg") for repo in *; do + [[ ! $_repo || $_repo = $repo ]] || continue [[ -d $repo ]] || continue (( DEBUG >= 2 )) && set -x local findarg="$repo/$pkg_escaped-[^-]+-[^-]+$" -- 1.7.1