enable debug mode when autoroot.debug exists

This commit is contained in:
throwaway96 2024-04-20 14:58:33 -04:00
parent 7221151ca7
commit 292e4df6ba
2 changed files with 6 additions and 1 deletions

View File

@ -27,6 +27,9 @@ it will run again.
A log file named `autoroot.log` should be created on the USB drive.
You can enable additional logging by creating a file named `autoroot.debug` in
the root directory of the USB drive.
## Support
You can find more information at [webosbrew.org](https://www.webosbrew.org/).

View File

@ -59,7 +59,9 @@ flock -x -n -- 200 || { echo '[!] Another instance of this script is currently r
trap -- "rm -f -- '${lockfile}'" EXIT
toast 'Script is running!'
[ -e "${USB_PATH}/autoroot.debug" ] && DEBUG='file'
[ -n "${DEBUG}" ] && toast 'Script is running!'
umask 022