live-build/functions/echo.sh

45 lines
626 B
Bash
Raw Normal View History

2007-09-23 08:04:49 +00:00
#!/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 ()
{
2007-09-23 08:04:49 +00:00
if [ "${LH_DEBUG}" = "enabled" ]
2007-09-23 08:04:49 +00:00
then
echo "D: ${@}"
fi
}
Echo_error ()
{
echo "E: ${@}"
}
Echo_message ()
{
2007-09-23 08:04:49 +00:00
if [ "${LH_QUIET}" != "enabled" ]
2007-09-23 08:04:49 +00:00
then
echo "P: ${@}"
fi
}
Echo_verbose ()
{
2007-09-23 08:04:49 +00:00
if [ "${LH_VERBOSE}" = "enabled" ]
2007-09-23 08:04:49 +00:00
then
echo "I: ${@}"
fi
}
Echo_warning ()
{
echo "W: ${@}"
}