From f49c181e21d2a1a1956f8470ba444860ac3e1568 Mon Sep 17 00:00:00 2001 From: staticsafe Date: Thu, 8 Mar 2012 12:32:22 -0500 Subject: [PATCH] fixing some issues in update script. --- envupdate.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/envupdate.sh b/envupdate.sh index dd5d609..46620aa 100755 --- a/envupdate.sh +++ b/envupdate.sh @@ -25,13 +25,18 @@ tar xjvf vimdir.tar.bz2 # zsh dir -if [ -d "~/dev/dotfiles" ] ; then - cd ~/dev/dotiles +if [[ -d ~/dev/dotfiles ]]; then + cd ~/dev/dotfiles git pull - ln -s ~/dev/dotfiles/.zsh ~/.zsh + ln -s ~/dev/dotfiles/.zsh ~/ else + if [[ -d ~/.zsh ]]; then + rm ~/.zsh + else + printf '%s\n' "No .zsh dir exists." + fi mkdir ~/dev cd ~/dev git clone https://github.com/staticsafe/dotfiles.git - ln -s ~/dev/dotfiles/.zsh ~/.zsh + ln -s ~/dev/dotfiles/.zsh ~/ fi