fixed recursion in function
This commit is contained in:
parent
86c10738ce
commit
5b9984df80
1 changed files with 5 additions and 3 deletions
|
|
@ -412,10 +412,10 @@ run-and-log(){
|
||||||
logger(){
|
logger(){
|
||||||
if [ ! -z $logfile ] ; then
|
if [ ! -z $logfile ] ; then
|
||||||
if [ ! -f $logfile ] ; then
|
if [ ! -f $logfile ] ; then
|
||||||
run mkdir -p ${rundir%/*}
|
#run mkdir -p ${rundir%/*}
|
||||||
touch $logfile
|
touch $logfile
|
||||||
fi
|
fi
|
||||||
$@ 2>&1 | tee >(
|
"$@" 2>&1 | tee >(
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
# strip any escaped strings for logging output
|
# strip any escaped strings for logging output
|
||||||
_line=$(echo $line | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tr -dc '[:print:]')
|
_line=$(echo $line | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tr -dc '[:print:]')
|
||||||
|
|
@ -513,7 +513,9 @@ install-dir() {
|
||||||
success(){
|
success(){
|
||||||
_line="$@"
|
_line="$@"
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
boxborder "${scriptname} ${grn}SUCCESS${dfl} ${_line}"
|
boxtop
|
||||||
|
boxline "${scriptname} ${grn}SUCCESS${dfl} ${_line}"
|
||||||
|
boxbottom
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue