diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2016-11-09 12:14:47 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-11-09 12:14:47 +0000 |
commit | f493e5126bcbff747f332437e80603da9b1c3a89 (patch) | |
tree | 8db26e6ab14db29b83ecffefbd7121ef798594f9 /Mk | |
parent | 156a6ec0fcae161f97069b391ebf928a59fed3c8 (diff) |
Notes
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 83e0db76d98c..90ea1b2a2c7c 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -2057,14 +2057,15 @@ MAKE_ENV+= ${INSTALL_MACROS} SCRIPTS_ENV+= ${INSTALL_MACROS} # Macro for copying entire directory tree with correct permissions -COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ - 2>&1) && \ - ${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \ - ${FIND} -d $$0 $$2 -type f -exec chmod ${BINMODE} $$1/{} \;' -- -COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ - 2>&1) && \ - ${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \ - ${FIND} -d $$0 $$2 -type f -exec chmod ${SHAREMODE} $$1/{} \;' -- +# In the -exec shell commands, we add add a . as the first argument, it would +# end up being $0 aka the script name, which is not part of $@, so we force it +# to be able to use $@ directly. +COPYTREE_BIN= ${SH} -c '(${FIND} -Ed $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null 2>&1) && \ + ${FIND} -Ed $$0 $$2 \( -type d -exec ${SH} -c '\''cd '\''$$1'\'' && chmod 755 "$$@"'\'' -- . {} + \ + -o -type f -exec ${SH} -c '\''cd '\''$$1'\'' && chmod ${BINMODE} "$$@"'\'' -- . {} + \)' -- +COPYTREE_SHARE= ${SH} -c '(${FIND} -Ed $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null 2>&1) && \ + ${FIND} -Ed $$0 $$2 \( -type d -exec ${SH} -c '\''cd '\''$$1'\'' && chmod 755 "$$@"'\'' -- . {} + \ + -o -type f -exec ${SH} -c '\''cd '\''$$1'\'' && chmod ${SHAREMODE} "$$@"'\'' -- . {} + \)' -- # The user can override the NO_PACKAGE by specifying this from # the make command line |