aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 () {