command_dev_debug.sh 617 B

12345678910111213141516171819202122
  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. fn_firstcommand_reset
  10. if [ -f "${rootdir}/.dev-debug" ]; then
  11. rm "${rootdir:?}/.dev-debug"
  12. fn_print_ok_nl "Disabled dev-debug"
  13. fn_script_log_info "Disabled dev-debug"
  14. else
  15. date '+%s' > "${rootdir}/.dev-debug"
  16. fn_print_ok_nl "Enabled dev-debug"
  17. fn_script_log_info "Enabled dev-debug"
  18. fi
  19. core_exit.sh