find $(echo $PATH | tr ':' ' ') -maxdepth 1 -type f -name 'zpm-*' -executable -printf '%P\n'
;;
*)
- ecmd=$(command -v "zpm-$cmd") || die "$0: unknown command $cmd"
+ ecmd=$(command -v "zpm-$cmd") || die "$0: unknown command $cmd $@"
exec "$ecmd" "$@" || die "$0: could not exec $ecmd"
;;
esac
shift
fi
-pkgname=$1
+pkgname="$1"
-pacman -Qlq "$1" | while read file; do
+pacman -Qlq "$pkgname" | while read file; do
if [ ! -f "$file" ]; then continue; fi
soname=$(soname $file)
if [ $? -eq 0 ] && [ -n "$soname" ]; then
dir=$(dirname "$file")
- mkdir -p $dir/preserve
+ mkdir -p "$dir/preserve"
if [ "$verbose" -gt 0 ]; then
- printf 'preserving %s\n' $file
+ printf 'preserving %s\n' "$file"
fi
- ln -f $file "$dir/preserve/"
+ ln -f "$file" "$dir/preserve/"
fi
done