From 5176a24540cea0a74295cdede69e14dcd2e29848 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 18 Mar 2013 09:56:29 -0700 Subject: [PATCH] Made setup not automatically do all that brew stuff. --- bootstrap.sh | 1 - setup.sh | 77 ++++++++++++++++++++++++++++------------------------ 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 3c719953..4ca53929 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,6 +1,5 @@ #!/bin/bash cd "$(dirname "${BASH_SOURCE}")" -git pull function doIt() { rsync --exclude "oh-my-zsh" --exclude "tmux-powerline" --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" --exclude "setup.sh" -av . ~ } diff --git a/setup.sh b/setup.sh index 0d63aae3..0fc1ed58 100755 --- a/setup.sh +++ b/setup.sh @@ -1,45 +1,50 @@ #!/bin/bash # Go to the source directory of this script. cd "$(dirname "${BASH_SOURCE}")" -sudo -v -source bootstrap.sh -case `uname` in - 'Darwin') - hash gcc &>/dev/null - if [ $? -ne 0 ] - then - echo "gcc not found." +function install_essentials() { + case `uname` in + 'Darwin') + hash gcc &>/dev/null + if [ $? -ne 0 ] + then + echo "gcc not found." + exit + case `sw_vers | grep ProductVersion | awk '{print $2}' | awk 'BEGIN{FS="."}{print $2}'` in + '8') + echo 'Mountain Lion Detected.' + ;; + '7') + echo 'Lion Detected.' + ;; + *) + exit -1 + ;; + esac + else + echo "gcc found." + source ~/.osx + fi + hash brew &>/dev/null && echo "brew found." || ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" + source .brew + ;; + 'Linux') + echo 'Linux' + hash apt-get &>/dev/null || echo 'apt-get is missing.' && exit + apt-get install build-essential + ;; + *) + echo "Operating System not recognized; aborting." exit - case `sw_vers | grep ProductVersion | awk '{print $2}' | awk 'BEGIN{FS="."}{print $2}'` in - '8') - echo 'Mountain Lion Detected.' - ;; - '7') - echo 'Lion Detected.' - ;; - *) - exit -1 - ;; - esac - else - echo "gcc found." - source ~/.osx - fi - hash brew &>/dev/null && echo "brew found." || ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" - source .brew - ;; - 'Linux') - echo 'Linux' - hash apt-get &>/dev/null || echo 'apt-get is missing.' && exit - apt-get install build-essential - ;; - *) - echo "Operating System not recognized; aborting." - exit -esac + esac +} + +sudo -v +echo "Installing Dot Files." +source bootstrap.sh +[ "$1" == "--install" -o "$1" == "-i" ] && install_essentials echo "Installing Tmux Configuration." tmux-powerline/generate_conf.sh echo "Installing oh-my-zsh." -oh-my-zsh/install.sh \ No newline at end of file +oh-my-zsh/install.sh