added check to logfile

This commit is contained in:
alanw 2023-05-10 10:07:09 -07:00
parent 14e4a6139d
commit 86c10738ce

View file

@ -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