|
@@ -1,15 +1,20 @@
|
|
|
#!/bin/bash
|
|
|
set -o errexit -o pipefail
|
|
|
-has curl || gimme_pkg curl
|
|
|
-
|
|
|
-if [[ "$OS" = "Darwin" ]]; then
|
|
|
- [[ -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)
|
|
|
- brew tap caskroom/cask
|
|
|
-else
|
|
|
- if ! has apt-get; then
|
|
|
- echo "ERROR: Your OS does not have 'apt-get' and is not currently supported."
|
|
|
- echo "For support please see the website: $GIMME_URL"
|
|
|
+
|
|
|
+if ! has "$GIMME"; then
|
|
|
+
|
|
|
+ has curl || gimme_pkg curl
|
|
|
+
|
|
|
+ if [[ "$OS" = "Darwin" ]]; then
|
|
|
+ [[ -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)
|
|
|
+ [[ -d "$HOME/homebrew/Caskroom" ]] || brew tap caskroom/cask
|
|
|
+ else
|
|
|
+ if ! has apt-get; then
|
|
|
+ echo "ERROR: Your OS does not have 'apt-get' and is not currently supported."
|
|
|
+ echo "For support please see the website: $GIMME_URL"
|
|
|
+ fi
|
|
|
fi
|
|
|
-fi
|
|
|
|
|
|
-has "$GIMME" || gimme_pkg "$GIMME"
|
|
|
+ gimme_pkg "$GIMME"
|
|
|
+
|
|
|
+fi
|