command_dev_debug.sh 639 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. local commandname="DEV-DEBUG"
  7. local commandaction="Dev-Debug"
  8. local function_selfname="$(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. echo "########## ${rootdir}/.dev-debug"
  15. date > "${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