command_dev_debug.sh 633 B

123456789101112131415161718192021222324
  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. fn_commandname(){
  7. commandname="DEV-DEBUG"
  8. commandaction="Developer debug"
  9. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. }
  11. fn_commandname
  12. if [ -f "${rootdir}/.dev-debug" ]; then
  13. rm "${rootdir:?}/.dev-debug"
  14. fn_print_ok_nl "Disabled dev-debug"
  15. fn_script_log_info "Disabled dev-debug"
  16. else
  17. date '+%s' > "${rootdir}/.dev-debug"
  18. fn_print_ok_nl "Enabled dev-debug"
  19. fn_script_log_info "Enabled dev-debug"
  20. fi
  21. core_exit.sh