]> pd.if.org Git - zpackage/blobdiff - zpm-ipkgfile
let newpackage set additional fields
[zpackage] / zpm-ipkgfile
index 281fccadd1f137d5b4c6ee1d445ab2eb2413e7cd..15107d2bebaee5e1c928bc5e3cee69868a17cfba 100755 (executable)
@@ -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