summaryrefslogtreecommitdiffstats
path: root/bin/phase-helpers.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-09-08 09:15:39 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-08 09:15:39 -0700
commitd23756ce3cb10fecbb8735fbbc784ef76e1621f3 (patch)
tree52c8dcc32b4ffa1d18e78ab487165597c01e1909 /bin/phase-helpers.sh
parent7da74976e44534bcb286bd9bcb7a7847ba4d6a14 (diff)
downloadportage-d23756ce3cb10fecbb8735fbbc784ef76e1621f3.tar.gz
portage-d23756ce3cb10fecbb8735fbbc784ef76e1621f3.tar.bz2
portage-d23756ce3cb10fecbb8735fbbc784ef76e1621f3.zip
best/has_version: --host-root first arg only
Diffstat (limited to 'bin/phase-helpers.sh')
-rw-r--r--bin/phase-helpers.sh34
1 files changed, 12 insertions, 22 deletions
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 0587991f9..18877f059 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -656,18 +656,13 @@ _eapi5_apply_user_patches() {
has_version() {
local atom eroot host_root=false root=${ROOT}
- while [ $# -gt 0 ] ; do
- case "$1" in
- --host-root)
- host_root=true
- ;;
- *)
- [[ -n ${atom} ]] && die "${FUNCNAME[0]}: unused argument: $1"
- atom=$1
- ;;
- esac
+ if [[ $1 == --host-root ]] ; then
+ host_root=true
shift
- done
+ fi
+ atom=$1
+ shift
+ [ $# -gt 0 ] && die "${FUNCNAME[0]}: unused argument(s): $*"
if ${host_root} ; then
case "${EAPI}" in
@@ -713,18 +708,13 @@ has_version() {
best_version() {
local atom eroot host_root=false root=${ROOT}
- while [ $# -gt 0 ] ; do
- case "$1" in
- --host-root)
- host_root=true
- ;;
- *)
- [[ -n ${atom} ]] && die "${FUNCNAME[0]}: unused argument: $1"
- atom=$1
- ;;
- esac
+ if [[ $1 == --host-root ]] ; then
+ host_root=true
shift
- done
+ fi
+ atom=$1
+ shift
+ [ $# -gt 0 ] && die "${FUNCNAME[0]}: unused argument(s): $*"
if ${host_root} ; then
case "${EAPI}" in