From fdf77315d849ca147be2981fbfd8466028509ca0 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Thu, 28 Aug 2014 23:20:56 +0200 Subject: [PATCH] Made install script check if the files exitst before installing them --- install.sh | 24 ++++++++++++++++-------- zshrc | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index a6ec457..56156c2 100755 --- a/install.sh +++ b/install.sh @@ -4,12 +4,20 @@ if [ $EUID != 0 ]; then exit $? fi -ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf -ln -s ~/.dotfiles/zshrc ~/.zshrc -ln -s ~/.dotfiles/oh-my-zsh ~/.oh-my-zsh -ln -s ~/.dotfiles/vimrc ~/.vimrc -ln -s ~/.dotfiles/vim ~/.vim -ln -s ~/.dotfiles/gitignore ~/.gitignore +if [ ! -f ~/.tmux.conf ]; then ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf; fi +if [ ! -f ~/.zshrc ]; then ln -s ~/.dotfiles/zshrc ~/.zshrc; fi +if [ ! -f ~/.vimrc ]; then ln -s ~/.dotfiles/vimrc ~/.vimrc; fi +if [ ! -d ~/.vim ]; then ln -s ~/.dotfiles/vim ~/.vim; fi +if [ ! -f ~/.gitignore ]; then ln -s ~/.dotfiles/gitignore ~/.gitignore; fi -curl -fsSL https://raw.github.com/mislav/dotfiles/1500cd2/bin/tmux-vim-select-pane -o /usr/local/bin/tmux-vim-select-pane -chmod +x /usr/local/bin/tmux-vim-select-pane +#ln -s ~/.dotfiles/zshrc ~/.zshrc +#ln -s ~/.dotfiles/vimrc ~/.vimrc +#ln -s ~/.dotfiles/vim ~/.vim +#ln -s ~/.dotfiles/gitignore ~/.gitignore + +if [ ! -f /usr/local/bin/tmux-vim-select-pane ]; then + curl -fsSL https://raw.github.com/mislav/dotfiles/1500cd2/bin/tmux-vim-select-pane -o /usr/local/bin/tmux-vim-select-pane; + chmod +x /usr/local/bin/tmux-vim-select-pane; +fi + +echo "Done installing..." diff --git a/zshrc b/zshrc index 6527061..5083389 100644 --- a/zshrc +++ b/zshrc @@ -1,11 +1,11 @@ # Path to your oh-my-zsh configuration. -ZSH=/home/tim/.oh-my-zsh +ZSH=~/.dotfiles/oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. -ZSH_THEME="dx" +ZSH_THEME="example" # Example aliases # alias zshconfig="mate ~/.zshrc"