_default 590 B

1234567891011121314151617181920
  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. [[ -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)
  7. [[ -d "$HOME/homebrew/Caskroom" ]] || brew tap caskroom/cask
  8. else
  9. if ! has apt-get; then
  10. echo "ERROR: Your OS does not have 'apt-get' and is not currently supported."
  11. echo "For support please see the website: $GIMME_URL"
  12. fi
  13. fi
  14. gimme_pkg "$GIMME"
  15. fi