projects
/
gentoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06a2791
)
add die and has_version helpers
author
Mike Frysinger
<vapier@gentoo.org>
Fri, 23 Sep 2011 04:03:12 +0000
(
04:03
+0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Fri, 23 Sep 2011 04:03:12 +0000
(
04:03
+0000)
eclass/tests/tests-common.sh
patch
|
blob
|
history
diff --git
a/eclass/tests/tests-common.sh
b/eclass/tests/tests-common.sh
index 8b6869bc5b47625848746f7e76a368b61071f8a7..4de0f7bac46b95669179f6e8438e11d037bb385a 100644
(file)
--- a/
eclass/tests/tests-common.sh
+++ b/
eclass/tests/tests-common.sh
@@
-11,7
+11,7
@@
inherit() {
debug-print() {
[[ ${#} -eq 0 ]] && return
-
+
if [[ ${ECLASS_DEBUG_OUTPUT} == on ]]; then
printf 'debug: %s\n' "${@}" >&2
elif [[ -n ${ECLASS_DEBUG_OUTPUT} ]]; then
@@
-37,3
+37,12
@@
has() {
done
return 1
}
+
+die() {
+ echo "die: $*" 1>&2
+ exit 1
+}
+
+has_version() {
+ portageq has_version / "$@"
+}