Add rudimentary CentOS support

This commit is contained in:
Chris Sexton 2015-03-10 11:58:50 -04:00
parent 225b3f0b50
commit d4eef318c3
2 changed files with 18 additions and 4 deletions

View File

@ -62,7 +62,8 @@ export EDITOR=vim
alias asshole='sudo $(fc -l -n -1)' alias asshole='sudo $(fc -l -n -1)'
export GOPATH=~/ export GOROOT="$HOME"/go
export GOPATH="$HOME"
setopt interactivecomments setopt interactivecomments
unsetopt beep unsetopt beep
bindkey '^[#' pound-insert bindkey '^[#' pound-insert

View File

@ -91,14 +91,20 @@ if [[ "$UNAMESTR" == 'Linux' ]]; then
fn_distro fn_distro
if [[ "$os" == Ubuntu* ]]; then if [[ "$os" == Ubuntu* ]]; then
sudo apt-get install -y build-essential git irssi vim-nox zsh tmux sudo apt-get install -y build-essential git irssi vim-nox zsh tmux
[ -d "$HOME"/go ] || curl -L https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -xzC "$HOME"
elif [[ "$os" == CentOS* ]]; then
sudo yum install -y vim-enhanced zsh git
fi fi
elif [[ "$UNAMESTR" == 'Darwin' ]]; then elif [[ "$UNAMESTR" == 'Darwin' ]]; then
# Probably need to set up brew and brew install some stuff here... # Probably need to set up brew and brew install some stuff here...
true [ -d "$HOME"/go ] || curl -L https://storage.googleapis.com/golang/go1.4.2.darwin-amd64-osx10.8.tar.gz | tar -xzC "$HOME"
fi fi
export GOROOT="$HOME"/go
export GOPATH=$HOME
if [[ ! -d "$DOTFILES" ]]; then if [[ ! -d "$DOTFILES" ]]; then
git clone git@git.chrissexton.org:cws/dotfiles.git "$DOTFILES" git clone http://git.chrissexton.org/cws/dotfiles.git "$DOTFILES"
elif [[ ! -d "$DOTFILES"/files ]]; then elif [[ ! -d "$DOTFILES"/files ]]; then
die "You must have a destination for the dotfiles repository!" die "You must have a destination for the dotfiles repository!"
fi fi
@ -122,13 +128,20 @@ cat "$DOTFILES"/files/gitignore_global > "$HOME"/.gitignore_global
cat "$DOTFILES"/files/tmux.conf > "$HOME"/.tmux.conf cat "$DOTFILES"/files/tmux.conf > "$HOME"/.tmux.conf
cat "$DOTFILES"/files/vimrc > "$HOME"/.vimrc cat "$DOTFILES"/files/vimrc > "$HOME"/.vimrc
if [[ "$os" == CentOS* ]]; then
sudo ln -s /usr/bin/vim /usr/local/bin/vi
fi
if [[ ! -d "$HOME"/.oh-my-zsh ]]; then if [[ ! -d "$HOME"/.oh-my-zsh ]]; then
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
fi fi
if [[ ! "$SHELL" =~ .*zsh ]]; then if [[ ! "$SHELL" =~ .*zsh ]]; then
chsh -s "$(which zsh)" if [[ "$os" == CentOS* ]]; then
chsh -s /bin/zsh
else
chsh -s "$(which zsh)"
fi
fi fi
cat "$DOTFILES"/files/zshrc > "$HOME"/.zshrc cat "$DOTFILES"/files/zshrc > "$HOME"/.zshrc