command_dev_clear_functions.sh 714 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # command_dev_clear_functions.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Deletes the contents of the functions dir.
  6. fn_commandname(){
  7. commandname="DEV-CLEAR-MODULES"
  8. commandaction="Clearing modules"
  9. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. }
  11. fn_commandname
  12. echo -e "================================="
  13. echo -e "Clear Functions"
  14. echo -e "================================="
  15. echo -e ""
  16. if fn_prompt_yn "Do you want to delete all functions?" Y; then
  17. rm -rfv "${functionsdir:?}/"*
  18. rm -rfv "${configdirdefault:?}/"*
  19. fn_script_log_info "Cleared modules directory"
  20. fn_script_log_info "Cleared default config directory"
  21. fi
  22. core_exit.sh