which chmod or chown obviously doesn't grok. Since the manpages suggest
the mode should come first, we just take the first argument separate,
and leave it alone.
- if it isn't set, chmod/chown will bail out
- if it has spaces, we properly pass it through, up to chmod/chown to
decide what to do
- if it is a filename, chmod/chown will bail out for sure
svn path=/main/branches/prefix/; revision=6245
# Distributed under the terms of the GNU General Public License v2
# $Id$
-exec chown "${@/#/${ED}/}"
+# We want all paths to be in ${ED}, whether or not relative. The first
+# argument should be the mode, according to the man-page. It cannot
+# come after the first argument. That's cool for us.
+mode=$1 ; shift
+exec chown "${mode}" "${@/#/${ED}/}"
# Distributed under the terms of the GNU General Public License v2
# $Id$
-exec chmod "${@/#/${ED}/}"
+# We want all paths to be in ${ED}, whether or not relative. The first
+# argument should be the mode, according to the man-page. It cannot
+# come after the first argument. That's cool for us.
+mode=$1 ; shift
+exec chmod "${mode}" "${@/#/${ED}/}"