_default 560 B

123456789101112131415
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. has curl || gimme_pkg curl
  4. if [[ "$OS" = "Darwin" ]]; then
  5. [[ -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)
  6. has brew-cask || brew install caskroom/cask/brew-cask
  7. else
  8. if ! has apt-get; then
  9. echo "ERROR: Your OS does not have 'apt-get' and is not currently supported."
  10. echo "For support please see the website: $GIMME_URL"
  11. fi
  12. fi
  13. has "$GIMME" || gimme_pkg "$GIMME"