projects
/
grml-shlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added hook to enable debug like DEBUG=1; ./programm
[grml-shlib.git]
/
sh-lib
diff --git
a/sh-lib
b/sh-lib
index
4d858a9
..
06c66b5
100644
(file)
--- a/
sh-lib
+++ b/
sh-lib
@@
-51,6
+51,9
@@
function unsetVerbose { VERBOSE_TMP__=$VERBOSE__; VERBOSE__=0; }
function restoreVerbose { VERBOSE__=$VERBOSE_TMP__; }
function getVerbose { echo "$VERBOSE__"; }
function restoreVerbose { VERBOSE__=$VERBOSE_TMP__; }
function getVerbose { echo "$VERBOSE__"; }
+function setDebug { setVerbose "$DPRINT__"; }
+function unsetDebug { restoreVerbose; }
+
function setExitFunction { EXIT_FUNCTION__="$1"; }
function resetExitFunction { EXIT_FUNCTION__="_syslog"; }
# }}}
function setExitFunction { EXIT_FUNCTION__="$1"; }
function resetExitFunction { EXIT_FUNCTION__="_syslog"; }
# }}}
@@
-644,8
+647,16
@@
function _checkBootParam
return 1
}
_checkBootParam
return 1
}
_checkBootParam
+
+
+function _setDebugLevel
+{
+ local debug_="${DEBUG:-0}"
+ VERBOSE__="$debug_"
+}
+_checkBootParam
# }}}
# END OF FILE
################################################################################
# }}}
# END OF FILE
################################################################################
-# vim:foldmethod=marker
+# vim:foldmethod=marker
expandtab shiftwidth=2 tabstop=2