summaryrefslogtreecommitdiff
path: root/functions/echo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/echo.sh')
-rwxr-xr-xfunctions/echo.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/functions/echo.sh b/functions/echo.sh
new file mode 100755
index 000000000..89d2d6b2c
--- /dev/null
+++ b/functions/echo.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# echo.sh - define output methods
+# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+Echo_debug ()
+{
+ if [ "${DEBUG}" = "true" ]
+ then
+ echo "D: ${@}"
+ fi
+}
+
+Echo_error ()
+{
+ echo "E: ${@}"
+}
+
+Echo_message ()
+{
+ if [ "${QUIET}" != "true" ]
+ then
+ echo "P: ${@}"
+ fi
+}
+
+Echo_verbose ()
+{
+ if [ "${VERBOSE}" = "true" ]
+ then
+ echo "I: ${@}"
+ fi
+}
+
+Echo_warning ()
+{
+ echo "W: ${@}"
+}