command_dev_debug.sh 595 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # LinuxGSM command_dev_debug.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Dev only: Enables debugging log to be saved to dev-debug.log.
  6. commandname="DEV-DEBUG"
  7. commandaction="Developer debug"
  8. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  9. if [ -f "${rootdir}/.dev-debug" ]; then
  10. rm "${rootdir:?}/.dev-debug"
  11. fn_print_ok_nl "Disabled dev-debug"
  12. fn_script_log_info "Disabled dev-debug"
  13. else
  14. date '+%s' > "${rootdir}/.dev-debug"
  15. fn_print_ok_nl "Enabled dev-debug"
  16. fn_script_log_info "Enabled dev-debug"
  17. fi
  18. core_exit.sh