Skip to content
Browse files

trying to figure out why zshrc isnt getting linked correctly 2

  • Loading branch information...
1 parent c976e56 commit 192cf40572f47ee7dedb8c3c46f5e838a3aed2fb Alex Genco committed Mar 31, 2012
Showing with 15 additions and 5 deletions.
  1. +15 −5 setup.sh
View
20 setup.sh
@@ -19,9 +19,9 @@ git submodule update
backup_dir=$HOME/.backups
-for dotfile in bash_profile gvimrc pryrc zshrc bash_aliases gitconfig vimrc vim oh-my-zsh
+for dotfile in bash_profile gvimrc pryrc zshrc bash_aliases gitconfig vimrc
do
- if [ -f ~/.$dotfile -o -d ~/.$dotfile ]; then
+ if [ -f ~/.$dotfile ]; then
mkdir -p $backup_dir
mv ~/.$dotfile $backup_dir/$dotfile
echo "Backed up ~/.$dotfile to ~/$backup_dir/$dotfile"
@@ -31,13 +31,23 @@ do
echo "Linked ~/.$dotfile"
done
+for dotdir in vim oh-my-zsh
+do
+ if [ -d ~/.$dotdir ]; then
+ mkdir -p $backup_dir
+ mv ~/.$dotdir $backup_dir/$dotdir
+ echo "Backed up ~/.$dotdir to ~/$backup_dir/$dotdir"
+ fi
+
+ ln -s ./$dotdir ~/.$dotdir
+ echo "Linked ~/.$dotdir"
+done
+
if [ `basename $SHELL` != "zsh" ]; then
echo "Changing default shell to zsh"
chsh -s /bin/zsh
fi
-. ~/.zshrc
-
-echo "Successfully setup dotfiles!"
+echo "Successfully setup dotfiles! Restart shell for changes"
exit 0

0 comments on commit 192cf40

Please sign in to comment.
Something went wrong with that request. Please try again.