mfutil 695 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. #
  3. # mfutil - check env and define helpers
  4. #
  5. # Check dependencies
  6. which curl &>/dev/null || { echo "curl not found! Please install it."; exit 1 ; }
  7. which git &>/dev/null || { echo "git not found! Please install it."; exit 1 ; }
  8. which sed &>/dev/null || { echo "sed not found! Please install it."; exit 1 ; }
  9. OPEN=$( which gnome-open xdg-open open | head -n1 )
  10. SELF=`basename "$0"`
  11. # Check if called in the right location
  12. [[ -e "Marlin/src" ]] || { echo -e "This script must be called from a Marlin working copy with:\n ./buildroot/bin/$SELF $1" ; exit ; }
  13. perror() { echo -e "$0: \033[0;31m$1 -- $2\033[0m" ; }
  14. bugout() { ((DEBUG)) && echo -e "\033[0;32m$1\033[0m" ; }