diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-07-29 06:00:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-07-29 06:00:17 +0000 |
commit | 1fcd2ffe2a3ec59219c77e9008ad8c5bc63b292a (patch) | |
tree | 9068ad71997758bda577a620965b5d5a6cdff908 /bin | |
parent | fix IMAGE usage in pkg_preinst so that ebuild authors dont have to know/care ... (diff) | |
download | portage-cvs-1fcd2ffe2a3ec59219c77e9008ad8c5bc63b292a.tar.gz portage-cvs-1fcd2ffe2a3ec59219c77e9008ad8c5bc63b292a.tar.bz2 portage-cvs-1fcd2ffe2a3ec59219c77e9008ad8c5bc63b292a.zip |
rewrite by Aron Griffis so that it works flawlessly with all options #97324
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fowners | 21 | ||||
-rwxr-xr-x | bin/fperms | 21 |
2 files changed, 6 insertions, 36 deletions
diff --git a/bin/fowners b/bin/fowners index 1d20940..54061d1 100755 --- a/bin/fowners +++ b/bin/fowners @@ -1,22 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/fowners,v 1.7 2005/05/04 22:49:14 vapier Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/fowners,v 1.8 2005/07/29 06:00:17 vapier Exp $ -if [ $# -lt 2 ] ; then - echo "${0}: at least two arguments needed" 1>&2 - exit 1 -fi - -OPTS="" -while [ "${1:0:1}" = "-" ] ; do - OPTS="${OPTS} $1" - shift -done - -OWNER="${1}" -shift - -for FILE in "$@" ; do - chown ${OPTS} "${OWNER}" "${D}${FILE}" -done +slash=/ +exec chown "${@/#${slash}/${D}${slash}}" @@ -1,22 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/fperms,v 1.7 2005/05/04 22:49:14 vapier Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/fperms,v 1.8 2005/07/29 06:00:17 vapier Exp $ -if [ $# -lt 2 ] ; then - echo "${0}: at least two arguments needed" 1>&2 - exit 1 -fi - -OPTS="" -while [ "${1:0:1}" = "-" ] ; do - OPTS="${OPTS} $1" - shift -done - -PERM=$1 -shift - -for FILE in "$@" ; do - chmod ${OPTS} "${PERM}" "${D}${FILE}" -done +slash=/ +exec chmod "${@/#${slash}/${D}${slash}}" |