[Lunar-commits] r22068 - lunar/trunk/var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Sun Nov 5 22:38:27 CET 2006
Author: sofar
Date: 2006-11-05 22:38:27 +0100 (Sun, 05 Nov 2006)
New Revision: 22068
Modified:
lunar/trunk/var/lib/lunar/functions/messages.lunar
Log:
Fix alias code bug when VERBOSE=on. Minor cleanups and speedups.
Modified: lunar/trunk/var/lib/lunar/functions/messages.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/messages.lunar 2006-11-05 21:12:55 UTC (rev 22067)
+++ lunar/trunk/var/lib/lunar/functions/messages.lunar 2006-11-05 21:38:27 UTC (rev 22068)
@@ -37,42 +37,42 @@
# normal messages go to stdout
message() {
- if [ -z "$SILENT" ] ; then
+ if [[ -z "$SILENT" ]] ; then
echo -e "$*"
fi
}
verbose_msg() {
- if [ "$VERBOSE" == "on" ] ; then
- message "+ $*"
+ if [[ "$VERBOSE" == "on" ]] ; then
+ message "+ $*" >&2
fi
}
debug_msg() {
local PLUSSES
- if [ -n "$LUNAR_DEBUG" ] ; then
- if [ "$LUNAR_DEBUG" -ge "2" ] ; then
- PLUSSES="+++++++++++++++++++++++++*"
- echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
- fi
- if [ "$LUNAR_DEBUG" -ge "4" ] ; then
+ if [[ -n "$LUNAR_DEBUG" ]] ; then
+ if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
+ PLUSSES="+++++++++++++++++++++++++*"
+ echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "4" ]] ; then
echo -n "$(basename $0)[$$]: " >&2
- fi
- if [ "$LUNAR_DEBUG" -ge "3" ] ; then
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "3" ]] ; then
echo -n "$(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: " >&2
- fi
- if [ "$LUNAR_DEBUG" -ge "2" ] ; then
- if [ "${FUNCNAME[1]}" != "$1" ]; then
- echo "$@" >&2
- else
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
+ if [[ "${FUNCNAME[1]}" != "$1" ]]; then
+ echo "$@" >&2
+ else
echo "${FUNCNAME[1]} ($@)" >&2
- fi
+ fi
else
echo "++ $@" >&2
fi
- if [ "$LUNAR_DEBUG" -ge "5" ] ; then
+ if [[ "$LUNAR_DEBUG" -ge "5" ]] ; then
echo "++ $@" >> $TMPDIR/lp_debuglog.$$
if [ -f $TMPDIR/l_debug_var.$$ ] ; then
mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
More information about the Lunar-commits
mailing list