From c5acea2fcf2575ca2327e23afb69070fb3d95037 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 23 May 2013 21:21:53 -0400 Subject: [PATCH 1/4] use variable $olddir instead of hard coded dotfiles_old/ --- makesymlinks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makesymlinks.sh b/makesymlinks.sh index c0bf3aa3..60266cd2 100755 --- a/makesymlinks.sh +++ b/makesymlinks.sh @@ -25,7 +25,7 @@ echo "done" # move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks from the homedir to any files in the ~/dotfiles directory specified in $files for file in $files; do echo "Moving any existing dotfiles from ~ to $olddir" - mv ~/.$file ~/dotfiles_old/ + mv ~/.$file $olddir/ echo "Creating symlink to $file in home directory." ln -s $dir/$file ~/.$file done From 7381500e300b0e56658df657dbb09d8862d74ba1 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 23 May 2013 21:40:14 -0400 Subject: [PATCH 2/4] using pwd of the cloned dotfiles rather than a specific location --- makesymlinks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makesymlinks.sh b/makesymlinks.sh index 60266cd2..c96ef2c6 100755 --- a/makesymlinks.sh +++ b/makesymlinks.sh @@ -6,7 +6,7 @@ ########## Variables -dir=~/dotfiles # dotfiles directory +dir=`pwd` olddir=~/dotfiles_old # old dotfiles backup directory files="bashrc vimrc vim zshrc oh-my-zsh private scrotwm.conf Xresources" # list of files/folders to symlink in homedir From 1858c888f551fdffa6ee8c3bd87eb65fc10a674a Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 23 May 2013 21:45:07 -0400 Subject: [PATCH 3/4] couldnt see the purpose of changing to the directory --- makesymlinks.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/makesymlinks.sh b/makesymlinks.sh index c96ef2c6..df4b56f4 100755 --- a/makesymlinks.sh +++ b/makesymlinks.sh @@ -17,11 +17,6 @@ echo -n "Creating $olddir for backup of any existing dotfiles in ~ ..." mkdir -p $olddir echo "done" -# change to the dotfiles directory -echo -n "Changing to the $dir directory ..." -cd $dir -echo "done" - # move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks from the homedir to any files in the ~/dotfiles directory specified in $files for file in $files; do echo "Moving any existing dotfiles from ~ to $olddir" From 2690c96edfd027b7486a164b85fa46f7dfa437b6 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 24 May 2013 07:02:54 -0400 Subject: [PATCH 4/4] use nicer syntax to represent pwd --- makesymlinks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makesymlinks.sh b/makesymlinks.sh index df4b56f4..2461f29f 100755 --- a/makesymlinks.sh +++ b/makesymlinks.sh @@ -6,7 +6,7 @@ ########## Variables -dir=`pwd` +dir=$(pwd) olddir=~/dotfiles_old # old dotfiles backup directory files="bashrc vimrc vim zshrc oh-my-zsh private scrotwm.conf Xresources" # list of files/folders to symlink in homedir