functions.sh 491 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. function progress {
  3. echo -en "\033[1;34m➔ "
  4. echo -en $*
  5. echo -en "\033[0m\n"
  6. }
  7. function debug {
  8. [ "_$VERBOSE" == "_1" ] || return
  9. echo -en "\033[1;37m # "
  10. echo -en $*
  11. echo -en "\033[0m\n"
  12. }
  13. function info {
  14. echo -en "\033[1;36m"
  15. echo -en $*
  16. echo -en "\033[0m\n"
  17. }
  18. function success {
  19. echo -en "\033[1;32m ✔ "
  20. echo -en $*
  21. echo -en "\033[0m\n"
  22. }
  23. function abort {
  24. echo -en "\033[1;31m ✘ "
  25. echo -en $*
  26. echo -en "\033[0m\n"
  27. popd > /dev/null
  28. exit 99
  29. }