Skip to content

Commit

Permalink
force symlink creation to workaround moved/deleted link targets
Browse files Browse the repository at this point in the history
  • Loading branch information
thepeterstone committed Jan 23, 2012
1 parent 4954d73 commit 84cf679
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/home-sync
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ main() {

backupAndReplace() {
[ -e $HOME/.$1 ] && mv -f $HOME/.$1 $ROOT/backups/$1
ln -s $ROOT/dot-files/$1 $HOME/.$1
# this needs to be forced because -e returns false for a dangling symlink
ln -sf $ROOT/dot-files/$1 $HOME/.$1
}

main

0 comments on commit 84cf679

Please sign in to comment.