X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-ipkgfile;h=15107d2bebaee5e1c928bc5e3cee69868a17cfba;hb=4b448fbc77510c589cc7f367c05bef63acc07858;hp=281fccadd1f137d5b4c6ee1d445ab2eb2413e7cd;hpb=119d9fae7499c4f2a20eba3753d6e76a09cc8783;p=zpackage diff --git a/zpm-ipkgfile b/zpm-ipkgfile index 281fcca..15107d2 100755 --- a/zpm-ipkgfile +++ b/zpm-ipkgfile @@ -48,10 +48,9 @@ ZPMPKGFILE=$pkgfile 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 @@ -73,6 +72,9 @@ for path in $*; do : ${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