diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-02-13 16:28:33 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-02-13 16:28:33 -0300 |
commit | 7166a9da5eabbda26948412fac3e9279158c82f5 (patch) | |
tree | 8fd902a084fb67a77b412ea12fe329d374b17c4d | |
parent | 5014f96eb2967c1cf5a7fe4c7971f2e48e5eb3ef (diff) | |
download | stowpkg-7166a9da5eabbda26948412fac3e9279158c82f5.tar.gz stowpkg-7166a9da5eabbda26948412fac3e9279158c82f5.tar.bz2 |
Fix: stowpkg_list: pattern selection
-rwxr-xr-x | stowpkg | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 () { |