# option for "multipackage" just to let the system know that's what you meant
# option to take filenames from stdin
# parse package, version, release from file if not given
-while getopts :f:v:r:l:P:S:Cc opt; do
+while getopts :f:v:r:l:P:S:Ccu:g: opt; do
case $opt in
f) pkgfile="$OPTARG" ;;
v) pkgver="$OPTARG" ;;
t) tags="$tags $OPTARG" ;;
c) tags="$tags configuration" ;;
C) create=1 ;;
+ u) username="$OPTARG" ;;
+ g) groupname="$OPTARG" ;;
*) echo 'unknown option' $opt; exit 1 ;;
esac
done
mtime=$(zpm stat -f '%y' $path)
uid=$(zpm stat -f '%u' $path)
gid=$(zpm stat -f '%g' $path)
- username=$(zpm stat -f '%U' $path)
- groupname=$(zpm stat -f '%G' $path)
+ : ${username:=$(zpm stat -f '%U' $path)}
+ : ${groupname:=$(zpm stat -f '%G' $path)}
mode=$(zpm stat -f '%a' $path)
rpath="$path"