After Spanky's change, also the mode would get prefixed with ${ED},
authorFabian Groffen <grobian@gentoo.org>
Sun, 18 Mar 2007 12:00:20 +0000 (12:00 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 18 Mar 2007 12:00:20 +0000 (12:00 -0000)
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

bin/fowners
bin/fperms

index d2b493478d51992aa0efe1ac8fa0552a7f0cba98..30f375545aa8cf28098abd105f0ed52ac47c9f44 100755 (executable)
@@ -3,4 +3,8 @@
 # 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}/}"
index ff77e68fca3ffe666476cb1b7149c858ccbc87e2..9508436173737ecc8507bfc3f0e3fda85cc1b535 100755 (executable)
@@ -3,4 +3,8 @@
 # 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}/}"