From eab8cf6241119b2c1c44d5ec68ea53c7e4224a3b Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sun, 10 Aug 2014 19:39:12 +1000 Subject: replace --reference on chmod/chown commands Signed-off-by: Allan McRae --- scripts/Makefile.am | 2 ++ scripts/pacman-optimize.sh.in | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index bc1dc10c..4ef3ce0e 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -69,6 +69,8 @@ edit = sed \ -e 's|@TEMPLATE_DIR[@]|$(TEMPLATE_DIR)|g' \ -e 's|@DEBUGSUFFIX[@]|$(DEBUGSUFFIX)|g' \ -e "s|@INODECMD[@]|$(INODECMD)|g" \ + -e "s|@OWNERCMD[@]|$(OWNERCMD)|g" \ + -e "s|@MODECMD[@]|$(MODECMD)|g" \ -e 's|@SIZECMD[@]|$(SIZECMD)|g' \ -e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \ -e 's|@DUFLAGS[@]|$(DUFLAGS)|g' \ diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in index 93742695..7c809193 100644 --- a/scripts/pacman-optimize.sh.in +++ b/scripts/pacman-optimize.sh.in @@ -168,8 +168,8 @@ msg "$(gettext "Rotating database into place...")" fail=0 mv "$localdb" "$localdb.old" || fail=1 mv "$localdb.new" "$localdb" || fail=1 -chmod --reference="$localdb.old" "$localdb" || fail=1 -chown --reference="$localdb.old" "$localdb" || fail=1 +chmod $(@MODECMD@ "$localdb.old") "$localdb" || fail=1 +chown $(@OWNERCMD@ "$localdb.old") "$localdb" || fail=1 if (( fail )); then # failure with our directory shuffle die_r "$(gettext "New database substitution failed. Check for %s, %s, and %s directories.")" "$localdb" "$localdb.old" "$localdb.new" -- cgit v1.2.3-24-g4f1b