added check to logfile
This commit is contained in:
parent
14e4a6139d
commit
86c10738ce
1 changed files with 17 additions and 13 deletions
|
|
@ -410,6 +410,7 @@ run-and-log(){
|
|||
}
|
||||
|
||||
logger(){
|
||||
if [ ! -z $logfile ] ; then
|
||||
if [ ! -f $logfile ] ; then
|
||||
run mkdir -p ${rundir%/*}
|
||||
touch $logfile
|
||||
|
|
@ -424,6 +425,9 @@ logger(){
|
|||
fi
|
||||
done >> $logfile
|
||||
)
|
||||
else
|
||||
$@
|
||||
fi
|
||||
}
|
||||
|
||||
# File handling functions
|
||||
|
|
|
|||
Loading…
Reference in a new issue