summaryrefslogtreecommitdiff
path: root/functions/echo.sh
blob: 71800ade1d2bbfa77d7af260982d9002e85affec (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 [ "${LH_DEBUG}" = "enabled" ]
	then
		echo "D: ${@}"
	fi
}

Echo_error ()
{
	echo "E: ${@}"
}

Echo_message ()
{
	if [ "${LH_QUIET}" != "enabled" ]
	then
		echo "P: ${@}"
	fi
}

Echo_verbose ()
{
	if [ "${LH_VERBOSE}" = "enabled" ]
	then
		echo "I: ${@}"
	fi
}

Echo_warning ()
{
	echo "W: ${@}"
}