Ok, I think I've applied all your suggestions. Sorry for the delay.
Anything else to change?

-- 
Best regards,
Michał Górny
? tests-common.sh.diff
Index: tests-common.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/tests-common.sh,v
retrieving revision 1.1
diff -u -r1.1 tests-common.sh
--- tests-common.sh	2 Jan 2008 01:01:18 -0000	1.1
+++ tests-common.sh	14 Oct 2010 13:13:44 -0000
@@ -8,3 +8,21 @@
 		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 ${*}"
+}

Attachment: signature.asc
Description: PGP signature

Reply via email to