Update setLogToFile()
This commit is contained in:
parent
48fe8de185
commit
1ae24a1a0a
|
@ -25,7 +25,7 @@ checkParameters() {
|
||||||
-l | --log)
|
-l | --log)
|
||||||
checkForDependencies "libnewt"
|
checkForDependencies "libnewt"
|
||||||
setDialogBox "whiptail"
|
setDialogBox "whiptail"
|
||||||
setLogToFile true
|
setLogToFile true "$(pwd -P)"
|
||||||
;;
|
;;
|
||||||
-p | --packages)
|
-p | --packages)
|
||||||
installPackages=true
|
installPackages=true
|
||||||
|
|
|
@ -171,8 +171,9 @@ getDialogBox() {
|
||||||
|
|
||||||
setLogToFile() {
|
setLogToFile() {
|
||||||
export logToFile=${1}
|
export logToFile=${1}
|
||||||
|
export logFolder=${2}
|
||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
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