aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-08-12 15:11:43 +0000
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-08-13 21:38:26 +0000
commit52bc5b1f61040e15db3cd508007955e343b27f24 (patch)
treef4a8606c4bf7b8afcd0f1c9c3814d7b594b583b6 /paludis/repositories/e/ebuild/exheres-0
parenta645e704e18e1d7baa64fe2d7e3cdf91534c14bb (diff)
downloadpaludis-52bc5b1f61040e15db3cd508007955e343b27f24.tar.gz
paludis-52bc5b1f61040e15db3cd508007955e343b27f24.tar.xz
has_version/best_version --slash/--root
Diffstat (limited to 'paludis/repositories/e/ebuild/exheres-0')
-rwxr-xr-xpaludis/repositories/e/ebuild/exheres-0/portage_stubs.bash24
1 files changed, 20 insertions, 4 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash b/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash
index 2eff44898..ef6509026 100755
--- a/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash
@@ -23,8 +23,16 @@
has_version()
{
illegal_in_global_scope
- [[ "${#@}" -ne 1 ]] && die "$0 should take exactly one arg"
- local r=$(paludis_pipe_command HAS_VERSION "$EAPI" "$1" )
+ local slash
+ if [[ "${#}" -eq 1 ]]; then
+ slash=--root
+ elif [[ "${#}" -eq 2 ]]; then
+ slash=${1}
+ shift
+ else
+ die "$0 should take one or two arguments"
+ fi
+ local r=$(paludis_pipe_command HAS_VERSION "$EAPI" "$slash" "$1" )
return ${r%%;*}
}
@@ -36,8 +44,16 @@ portageq()
best_version()
{
illegal_in_global_scope
- [[ "${#@}" -ne 1 ]] && die "$0 should take exactly one arg"
- local r=$(paludis_pipe_command BEST_VERSION "$EAPI" "$1" )
+ local slash
+ if [[ "${#}" -eq 1 ]]; then
+ slash=--root
+ elif [[ "${#}" -eq 2 ]]; then
+ slash=${1}
+ shift
+ else
+ die "$0 should take one or two arguments"
+ fi
+ local r=$(paludis_pipe_command BEST_VERSION "$EAPI" "$slash" "$1" )
echo ${r#*;}
return ${r%%;*}
}