isconfig=0
addcontent=1
complete=0
+mode=
# 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
c) isconfig=1 ;;
u) username="$OPTARG" ;;
g) groupname="$OPTARG" ;;
+ m) mode="$OPTARG" ;;
v) verbose=$((verbose + 1)) ;;
C) complete=1 ;;
*) echo 'unknown option' $OPTARG; exit 1 ;;
mtime=$(zpm stat -f '%y' $path)
uid=$(zpm stat -f '%u' $path)
gid=$(zpm stat -f '%g' $path)
- mode=$(zpm stat -f '%a' $path)
+
+ if [ -z "$mode" ]; then
+ mode=$(zpm stat -f '%a' $path)
+ fi
# only stat the file for the user and group name if not set on the
# command line