Created
August 24, 2011 06:13
-
-
Save suderman/1167406 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Running dotfiles install" | |
if [ ! -d "$HOME/.oh-my-zsh" ]; then | |
git clone git://github.com/robbyrussell/oh-my-zsh.git "$HOME/.oh-my-zsh" | |
cd "$HOME/.oh-my-zsh" | |
grep -v '!custom' "$HOME/.oh-my-zsh/.gitignore" > "$HOME/.oh-my-zsh/.gitignore.tmp" | |
echo "custom" >> "$HOME/.oh-my-zsh/.gitignore.tmp" | |
rm -f "$HOME/.oh-my-zsh/.gitignore" | |
mv "$HOME/.oh-my-zsh/.gitignore.tmp" "$HOME/.oh-my-zsh/.gitignore" | |
git add .gitignore | |
git rm custom/example.zsh | |
git rm custom/example/example.plugin.zsh | |
git commit -m 'Ignore custom directory' | |
cd - | |
echo "Installed oh-my-zsh" | |
fi | |
ln -sfn "$PWD/zsh/zshrc" "$HOME/.zshrc" | |
rm -rf "$HOME/.oh-my-zsh/custom" | |
ln -sfn "$PWD/zsh" "$HOME/.oh-my-zsh/" | |
mv "$HOME/.oh-my-zsh/zsh" "$HOME/.oh-my-zsh/custom" | |
echo "Linked zshrc, oh-my-zsh custom directory" | |
ln -sFn "$PWD/chef" "$HOME/.chef" | |
echo "Linked chef" | |
ln -sfn "$PWD/ruby/rvmrc" "$HOME/.rvmrc" | |
ln -sfn "$PWD/ruby/gemrc" "$HOME/.gemrc" | |
ln -sfn "$PWD/ruby/autotest" "$HOME/.autotest" | |
ln -sfn "$PWD/ruby/irbrc" "$HOME/.irbrc" | |
ln -sfn "$PWD/ruby/bridge_keys" "$HOME/.bridge_keys" | |
echo "Linked rvmrc, gemrc, autotest, irbrc, bridge_keys" | |
ln -sfn "$PWD/scm/gitconfig" "$HOME/.gitconfig" | |
ln -sfn "$PWD/scm/gitignore" "$HOME/.gitignore" | |
ln -sfn "$PWD/scm/hgrc" "$HOME/.hgrc" | |
echo "Linked gitconfig, gitignore, hgrc" | |
ln -sfn "$PWD/text/inputrc" "$HOME/.inputrc" | |
ln -sfn "$PWD/text/nanorc" "$HOME/.nanorc" | |
echo "Linked inputrc, nanorc" | |
ln -sfn "$PWD/vim/vimrc" "$HOME/.vimrc" | |
ln -sfn "$PWD/vim/gvimrc" "$HOME/.gvimrc" | |
ln -sfn "$PWD/vim/vim-update-bundles.conf" "$HOME/.vim-update-bundles.conf" | |
echo "Linked vimrc, gvimrc, vim-update-bundles.conf" | |
# Autojump uses this | |
mkdir -p "$HOME/.local/share" | |
echo "Created .local/share directory" | |
# Properly link ssh config inside .ssh directory | |
ln -sfn "$PWD/ssh-config" "$HOME/.ssh/config" | |
echo "Linked ssh-config to .ssh/config" | |
# Install vim | |
while true; do | |
read -p "Install vim configuration? (y/n) " yn | |
case $yn in | |
[Yy]* ) echo "Installing vim configuration"; ./vim-install; break;; | |
* ) echo "Done"; exit;; | |
esac | |
done | |
# Utilities I like to install | |
# brew install autojump | |
# brew install ghostscript | |
# brew install imagemagick | |
# brew install git | |
# brew install mysql | |
# brew install node | |
# brew install wget |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment