From 86cab6dc55e57ff0a2a96432ea71be438a890a74 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 18 Mar 2007 12:00:20 +0000 Subject: [PATCH] After Spanky's change, also the mode would get prefixed with ${ED}, 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 | 6 +++++- bin/fperms | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/fowners b/bin/fowners index d2b493478..30f375545 100755 --- a/bin/fowners +++ b/bin/fowners @@ -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}/}" diff --git a/bin/fperms b/bin/fperms index ff77e68fc..950843617 100755 --- a/bin/fperms +++ b/bin/fperms @@ -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}/}" -- 2.26.2