summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-03-01 18:24:18 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2009-03-01 18:24:18 +0100
commitde0c19f00bddc5574fc4d12717111a5937d7e385 (patch)
tree7cfe5697336ac6ea2af8f13719de2f1c1195c6eb /src
parente9804d56dc5bea86357905f73d093079d515fdd4 (diff)
premature die_error fix
Diffstat (limited to 'src')
-rwxr-xr-xsrc/aif.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/aif.sh b/src/aif.sh
index 9c9b84e..78275de 100755
--- a/src/aif.sh
+++ b/src/aif.sh
@@ -58,7 +58,7 @@ log ()
mkdir -p $LOG_DIR || die_error "Cannot create log directory"
str="[LOG] `date +"%Y-%m-%d %H:%M:%S"` $@"
echo -e "$str" > $LOG || die_error "Cannot log $str to $LOG"
- [ "$LOG_TO_FILE" = 1 ] && echo -e "$str" >> $LOGFILE || die_error "Cannot log $str to $LOGFILE"
+ [ "$LOG_TO_FILE" = 1 ] && ( echo -e "$str" >> $LOGFILE || die_error "Cannot log $str to $LOGFILE" )
}
# $1 = category. one of MAIN, PROCEDURE, UI, UI-INTERACTIVE, FS, MISC, NETWORK, PACMAN, SOFTWARE
@@ -73,7 +73,7 @@ debug ()
then
str="[DEBUG $1 ] $2"
echo -e "$str" > $LOG || die_error "Cannot debug $str to $LOG"
- [ "$LOG_TO_FILE" = 1 ] && echo -e "$str" >> $LOGFILE || die_error "Cannot debug $str to $LOGFILE"
+ [ "$LOG_TO_FILE" = 1 ] && ( echo -e "$str" >> $LOGFILE || die_error "Cannot debug $str to $LOGFILE" )
fi
}