_default 553 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. if ! has "$GIMME"; then
  4. has curl || gimme_pkg curl
  5. if [[ "$OS" = "Darwin" ]]; then
  6. if ! has brew; then
  7. [[ -d "$HOME/homebrew" ]] || (mkdir "$HOME/homebrew" 2>/dev/null && curl -L "https://github.com/Homebrew/homebrew/tarball/master" | tar xz --strip 1 -C "$HOME/homebrew" && brew update)
  8. fi
  9. else
  10. if ! has apt-get; then
  11. echo "ERROR: Your OS does not have 'apt-get' and is not currently supported."
  12. echo "For support please see the website: $GIMME_URL"
  13. fi
  14. fi
  15. gimme_pkg "$GIMME"
  16. fi