summaryrefslogtreecommitdiff
path: root/functions/echo.sh
blob: 89d2d6b2cc4090071d9984a2e67a30247d2e14e2 (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
32
33
34
35
36
37
38
39
40
41
42
43
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: ${@}"
}