Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105916945
D8283.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8283.diff
View Options
Index: head/Mk/bsd.port.mk
===================================================================
--- head/Mk/bsd.port.mk
+++ head/Mk/bsd.port.mk
@@ -2057,14 +2057,15 @@
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 3:24 PM (19 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15571663
Default Alt Text
D8283.diff (1 KB)
Attached To
Mode
D8283: Optimize COPYTREE_*
Attached
Detach File
Event Timeline
Log In to Comment