Update setLogToFile()
This commit is contained in:
parent
48fe8de185
commit
1ae24a1a0a
|
@ -25,7 +25,7 @@ checkParameters() {
|
|||
-l | --log)
|
||||
checkForDependencies "libnewt"
|
||||
setDialogBox "whiptail"
|
||||
setLogToFile true
|
||||
setLogToFile true "$(pwd -P)"
|
||||
;;
|
||||
-p | --packages)
|
||||
installPackages=true
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue