Update setLogToFile()

This commit is contained in:
Santiago Lo Coco 2022-01-18 22:08:02 -03:00
parent 48fe8de185
commit 1ae24a1a0a
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ checkParameters() {
-l | --log)
checkForDependencies "libnewt"
setDialogBox "whiptail"
setLogToFile true
setLogToFile true "$(pwd -P)"
;;
-p | --packages)
installPackages=true

View File

@ -171,8 +171,9 @@ getDialogBox() {
setLogToFile() {
export logToFile=${1}
export logFolder=${2}
}
debug() {
[[ -z ${logToFile+x} || $logToFile = true ]] && tee -a sadedot.log > /dev/null
[[ -z ${logToFile+x} || $logToFile = true ]] && tee -a "$logFolder/sadedot.log" > /dev/null
}