export ZPMPKGFILE
set -e
-for path in $*; do
-
- name=$(basename -- $path)
- dir=$(dirname -- $path)
+for path in "$@"; do
+ name=$(basename -- "$path")
+ dir=$(dirname -- "$path")
dir=${dir#/}
if [ "$pkgroot" != '/' ]; then
: ${owner:=$(pkgfileinfo username $path)}
: ${group:=$(pkgfileinfo groupname $path)}
+ # TODO if the file already exists, and is the correct
+ # hash or directory, do nothing
+
# can't use install because it's not posix.
# probably worth writing a zpm-install, but with
# a different name since that wants to be a package install