Add printStepIfDebug()
This commit is contained in:
parent
af1069d83d
commit
3fab8bfeff
10
install.sh
10
install.sh
|
@ -502,6 +502,14 @@ checkForSystemdUnit() {
|
||||||
trap - INT
|
trap - INT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printStepIfDebug() {
|
||||||
|
if [ $debugFlagToFile = true ] || [ $debugFlag = true ]; then
|
||||||
|
printf '\n%s' "============================================================" >> CocoASAIS.log
|
||||||
|
printf '\n%s\n' "$step" >> CocoASAIS.log
|
||||||
|
printf '%s\n' "============================================================" >> CocoASAIS.log
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
steps=(
|
steps=(
|
||||||
checkUefi
|
checkUefi
|
||||||
updateSystemClock
|
updateSystemClock
|
||||||
|
@ -567,7 +575,7 @@ runScript() {
|
||||||
|
|
||||||
while [ $i -lt "${#steps[@]}" ]; do
|
while [ $i -lt "${#steps[@]}" ]; do
|
||||||
step=${steps[$i]}
|
step=${steps[$i]}
|
||||||
[[ $debugFlagToStdout = true || $debugFlag = true ]] && printf '\n---\n%s\n---\n' "$step" >> CocoASAIS.log
|
printStepIfDebug
|
||||||
saveVar "lastStep" "$step"
|
saveVar "lastStep" "$step"
|
||||||
$step
|
$step
|
||||||
((i++))
|
((i++))
|
||||||
|
|
Loading…
Reference in New Issue