aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-02-13 16:28:33 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-02-13 16:28:33 -0300
commit7166a9da5eabbda26948412fac3e9279158c82f5 (patch)
tree8fd902a084fb67a77b412ea12fe329d374b17c4d
parent5014f96eb2967c1cf5a7fe4c7971f2e48e5eb3ef (diff)
downloadstowpkg-7166a9da5eabbda26948412fac3e9279158c82f5.tar.gz
stowpkg-7166a9da5eabbda26948412fac3e9279158c82f5.tar.bz2
Fix: stowpkg_list: pattern selection
-rwxr-xr-xstowpkg10
1 files changed, 7 insertions, 3 deletions
diff --git a/stowpkg b/stowpkg
index 6b61ade..76cb576 100755
--- a/stowpkg
+++ b/stowpkg
@@ -259,17 +259,21 @@ stowpkg_build () {
stowpkg_list () {
local pattern="$1"
- if [ ! -z "$pattern" ]; then
- local name="-name \'$pattern*\'"
+ #if [ ! -z "$pattern" ]; then
+ # local lname="-lname \'$pattern*\'"
+ #fi
+ if [ -z "$pattern" ]; then
+ pattern='*'
fi
+ #find $BASE $lname -type l | grep -v "^src/" | grep -v "^stow/" | while read file; do
find $BASE -type l | grep -v "^src/" | grep -v "^stow/" | while read file; do
dest="`stat $file | head -n 1 | cut -d '>' -f 2 | sed -e 's/ //'`"
if echo $dest | grep -q "^stow/" || echo $dest | grep -q "/stow/"; then
echo $dest | sed -e 's|.*stow/\(.*\)/.*|\1|'
fi
- done | sort | uniq
+ done | grep -E "$pattern" | sort | uniq
}
stowpkg_binaries () {