From b75caba1e9e139c0a29839cb5c28d31bb5ed063f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 20 Mar 2006 11:21:11 +0000 Subject: Move has, hasq, and hasv functions to isolated-functions.sh since they do not depend on ebuild.sh. svn path=/main/trunk/; revision=2964 --- bin/ebuild.sh | 16 ---------------- bin/isolated-functions.sh | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 791625c6d..d5e6ef682 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -144,22 +144,6 @@ useq() { fi } -has() { - hasq "$@" -} - -hasv() { - if hasq "$@" ; then - echo "$1" - return 0 - fi - return 1 -} - -hasq() { - [[ " ${*:2} " == *" $1 "* ]] -} - has_version() { if [ "${EBUILD_PHASE}" == "depend" ]; then die "portageq calls (has_version calls portageq) are not allowed in the global scope" diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 20be25e77..c257a10d5 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -206,4 +206,21 @@ RC_ENDCOL="yes" RC_INDENTATION='' RC_DEFAULT_INDENT=2 RC_DOT_PATTERN='' + +has() { + hasq "$@" +} + +hasv() { + if hasq "$@" ; then + echo "$1" + return 0 + fi + return 1 +} + +hasq() { + [[ " ${*:2} " == *" $1 "* ]] +} + true -- cgit v1.2.3-1-g7c22