blob: 3bba4946963b4e7ba97506717608ebb91e6d7f3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/bash
source /etc/init.d/functions.sh
inherit() {
local e
for e in "$@" ; do
source ../${e}.eclass
done
}
debug-print() {
[[ ${#} -eq 0 ]] && return
if [[ ${ECLASS_DEBUG_OUTPUT} == on ]]; then
printf 'debug: %s\n' "${@}" >&2
elif [[ -n ${ECLASS_DEBUG_OUTPUT} ]]; then
printf 'debug: %s\n' "${@}" >> "${ECLASS_DEBUG_OUTPUT}"
fi
}
debug-print-function() {
debug-print "${1}, parameters: ${*:2}"
}
debug-print-section() {
debug-print "now in section ${*}"
}
hasq() { [[ " ${*:2} " == *" $1 "* ]]; }
has() { hasq "$@"; }
|