summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-11-26 20:40:45 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2008-11-26 20:40:45 +0100
commit12bb467d36f9eb296108e60ec40a1f278e1f5d3e (patch)
treef474ed41da4004dc5dbdd014ba6feb3e76eb4f9c /bin
parent75222ff889d6fd869873758e520e4795ad2483dd (diff)
pkg: Make debug a no-op if it's not enabled
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/pkg b/bin/pkg
index 1ef3ac1..ee086c9 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -25,7 +25,6 @@ error=$'\e[0;31m'
reset=$'\e[0m'
function debug {
- (( DEBUG )) || return
typeset func line
if [[ ${#*} -ge 3 ]] {
func=$1
@@ -109,6 +108,12 @@ while [[ $1 == [-+]* ]] {
action=$1
shift
+# Avoid calling debug without debug mode... just in case one needs more speed
+if (( !DEBUG )) {
+ unalias debug
+ function debug {}
+}
+
##
## Make sure everything's sane
## Warn otherwise
@@ -120,7 +125,7 @@ if [[ ! -d $PDIR ]] {
##
-## Some additional variables related to PKG_ROOT
+## Setup some additional variables related to PKG_ROOT
##
# Protocol