summaryrefslogtreecommitdiff
path: root/scripts/xdg-utils-common.in
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2006-06-16 22:21:39 +0000
committerWaldo Bastian <waldo.bastian@intel.com>2006-06-16 22:21:39 +0000
commitf058645ed117304a6e9d2594c477ea8bf126eb01 (patch)
tree7af4afb2a8b3fc43f57f4d2400933c4f541f3cd6 /scripts/xdg-utils-common.in
parentdd6f5982de7e01e8f25f115b5153900ef0a91f7e (diff)
Add DEBUG: Make it possible to turn debug info on and off
Diffstat (limited to 'scripts/xdg-utils-common.in')
-rw-r--r--scripts/xdg-utils-common.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index 25acc81..582831e 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -3,6 +3,13 @@
# Common utility functions included in all XDG wrapper scripts
#----------------------------------------------------------------------------
+DEBUG()
+{
+ [ ${xdg_utils_debug_level-0} -lt $1 ] && return 0;
+ shift
+ echo "$@"
+}
+
#-------------------------------------------------------------
# Exit script on successfully completing the desired operation