diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-26 20:40:45 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-26 20:40:45 +0100 |
commit | 12bb467d36f9eb296108e60ec40a1f278e1f5d3e (patch) | |
tree | f474ed41da4004dc5dbdd014ba6feb3e76eb4f9c /bin | |
parent | 75222ff889d6fd869873758e520e4795ad2483dd (diff) |
pkg: Make debug a no-op if it's not enabled
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |