]> pd.if.org Git - zpackage/blobdiff - zpm-add
add zpm-search to look for packages and libraries
[zpackage] / zpm-add
diff --git a/zpm-add b/zpm-add
index 28c12f96fef2cd82f6af30b67e79a227f689b788..09adaac941102f50b2c10f854fd128e32e19c483 100755 (executable)
--- a/zpm-add
+++ b/zpm-add
@@ -127,10 +127,10 @@ for path in $*; do
        #echo adding $path
 
        # only stat the file for items not set on the command line
-       mode=${clmode:-$(zpm stat -f '%a' $path)}
-       username=${cluser:-$(zpm stat -f '%U' $path)}
-       groupname=${clgroup:-$(zpm stat -f '%G' $path)}
-       mtime=${clmtime:-$(zpm stat -f '%y' $path)}
+       mode=${clmode:-$(zpm stat -l -f '%a' $path)}
+       username=${cluser:-$(zpm stat -l -f '%U' $path)}
+       groupname=${clgroup:-$(zpm stat -l -f '%G' $path)}
+       mtime=${clmtime:-$(zpm stat -l -f '%y' $path)}
        filetype=${cltype:-$(zpm stat -l -f '%t' "$path")}
 
        rpath="$path"
@@ -199,8 +199,12 @@ for path in $*; do
 
        # TODO check that we have such a package,version,release
        #cat <<EOS
+       if [ $verbose -gt 2 ]; then
+               shellecho=".echo on"
+       fi
        zpm shell $pkgfile <<EOS
 begin;
+$shellecho
 insert or replace into packagefiles (package,version,release,path,mode,mtime,username,groupname,filetype,hash,configuration,target)
 values ('$package', '$pkgver', $pkgrel, '$rpath', '$mode',$mtime, '$username','$groupname','$filetype',$hash,$isconfig,$target);
 commit;