summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-20 11:21:11 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-20 11:21:11 +0000
commitb75caba1e9e139c0a29839cb5c28d31bb5ed063f (patch)
tree0ef3e848c95bed688e4bcac3c736d5b24a5b6195 /bin/isolated-functions.sh
parentFix sandbox feature (broken since r2947). (diff)
downloadportage-multirepo-b75caba1e9e139c0a29839cb5c28d31bb5ed063f.tar.gz
portage-multirepo-b75caba1e9e139c0a29839cb5c28d31bb5ed063f.tar.bz2
portage-multirepo-b75caba1e9e139c0a29839cb5c28d31bb5ed063f.zip
Move has, hasq, and hasv functions to isolated-functions.sh since they do not depend on ebuild.sh.
svn path=/main/trunk/; revision=2964
Diffstat (limited to 'bin/isolated-functions.sh')
-rw-r--r--bin/isolated-functions.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 20be25e7..c257a10d 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