浏览代码

replace old _install*() with gimme

Kyle P Davis 10 年之前
父节点
当前提交
4e25cd0b75
共有 1 个文件被更改,包括 4 次插入70 次删除
  1. 4 70
      .profile

+ 4 - 70
.profile

@@ -83,75 +83,9 @@ fi
 F="/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash";  ! [ -f "$F" ]  ||  . "$F"
 
 # Liquid Prompt
-F="$HOME/liquidprompt/liquidprompt";  ! [ "$PS1" -a -f "$F" ]  ||  . "$F"
+F="$HOME/.liquidprompt/liquidprompt";  ! [ "$PS1" -a -f "$F" ]  ||  . "$F"
 
-
-
-###############################################################################
-# Installers
-###############################################################################
-
-_install_homebrew() {
-	"xcode-select" --install 2>&1 | grep -q "already installed"  ||  exit
-	[ -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)
-	which brew-cask >/dev/null  ||  brew install caskroom/cask/brew-cask
-}
-
-_install_tools() {
-	_install_homebrew
-	[ -f "$HOME/.bash_profile" ]  ||  ln -sv "$HOME/.profile" "$HOME/.bash_profile"
-	[ -f "$HOME/.bashrc" ]        ||  ln -sv "$HOME/.profile" "$HOME/.bashrc"
-	[ -d "$HOME/liquidprompt" ]   ||  git clone "https://github.com/nojhan/liquidprompt.git" "$HOME/liquidprompt"
-	[ -f "$HOME/.gitconfig" ]  ||  (
-		git config --global color.ui true
-		git config --global credential.helper "$([ "$(uname -s)" = "Darwin" ] && echo "osxkeychain" || echo "cache --timeout=3600")"
-	)
-	which git-alias >/dev/null  ||  brew install git-extras
-	[ "$(git alias)" ]  ||  (
-		git alias br branch
-		git alias ci commit
-		git alias co checkout
-		git alias di diff
-		git alias st status
-	)
-	which tmux >/dev/null  ||  brew install tmux
-	which tree >/dev/null  ||  brew install tree
-	[ -d "$HOME/Applications/SourceTree.app" ]     ||  brew cask install sourcetree
-	[ -d "$HOME/Applications/Atom.app" ]           ||  brew cask install atom
-	[ -d "$HOME/Applications/Google Chrome.app" ]  ||  brew cask install google-chrome
-	[ -d "$HOME/Applications/Firefox.app" ]        ||  brew cask install firefox
-}
-
-_install_dev_js() {
-	_install_homebrew
-	which node >/dev/null  ||  brew install node
-	PKG="jshint";       which "$PKG" >/dev/null  ||  npm install -g "$PKG"
-	PKG="js-beautify";  which "$PKG" >/dev/null  ||  npm install -g "$PKG"
-	PKG="json";         which "$PKG" >/dev/null  ||  npm install -g "$PKG"
-	PKG="jscs";         which "$PKG" >/dev/null  ||  npm install -g "$PKG"
-}
-
-_install_dev_sh() {
-	_install_homebrew
-	which shellcheck >/dev/null  ||  brew install shellcheck
-}
-
-_install_dev_py() {
-	_install_homebrew
-	mkdir -p "$PYTHONPATH"
-	PKG="pylint";  which "$PKG" >/dev/null  ||  (easy_install -d "$PYTHONPATH" "$PKG"  &&  ln -sv "$PYTHONPATH/$PKG" "$BREW_PREFIX/bin/$PKG")
-	PKG="pep8";    which "$PKG" >/dev/null  ||  (easy_install -d "$PYTHONPATH" "$PKG"  &&  ln -sv "$PYTHONPATH/$PKG" "$BREW_PREFIX/bin/$PKG")
-}
-
-_install_dev_db() {
-	_install_homebrew
-	which mongod >/dev/null     ||  brew install mongodb     &&  ln -sfv "$BREW_PREFIX/opt/mongodb"/*.plist ~/Library/LaunchAgents/
-	which redis >/dev/null      ||  brew install redis       &&  ln -sfv "$BREW_PREFIX/opt/redis"/*.plist ~/Library/LaunchAgents/
-	which pg_config >/dev/null  ||  brew install postgresql  &&  ln -sfv "$BREW_PREFIX/opt/postgresql"/*.plist ~/Library/LaunchAgents/
-}
-
-_install_dev_go() {
-	_install_homebrew
-	which go >/dev/null  ||  brew install go --with-cc-common
-}
+# gimme gimme
+[ -d "$HOME/.gimme" ]  ||  curl -fsSL "https://github.com/KylePDavis/gimme/raw/master/gimme" | bash -
+! [ -f "$HOME/.gimme/gimme" ]  ||  . "$HOME/.gimme/gimme"