Skip to content

Commit

Permalink
install: Don't abort if ~/.vimrc or ~/.dircolors already exist.
Browse files Browse the repository at this point in the history
This change makes it possible for the install script to run all the way through if its rerun, e.g. after it's updated. Previously the script would have failed with:
    ln: failed to create symbolic link '/home/shane/.vimrc': File exists
Now,
    ln: replace '/home/shane/.vimrc'?
will be asked. (A similar question for .dircolors will also be asked.)

Ideally the questions wouldn't be asked if .vimrc and .dircolors won't be changed, i.e. they're already symlinks pointing to ./vimrc and ./dircolors respectively.
  • Loading branch information
shaneharper committed Jul 16, 2024
1 parent 95b00d2 commit 7033402
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set -o errexit -o errtrace -o pipefail
trap 'echo; echo Aborting.' ERR


ln -s `pwd`/vimrc ~/.vimrc
ln -si `pwd`/vimrc ~/.vimrc

ln -s `pwd`/dircolors ~/.dircolors
ln -si `pwd`/dircolors ~/.dircolors

git config --global core.excludesfile `pwd`/gitignore
git config --global diff.tool vimdiff
Expand Down

0 comments on commit 7033402

Please sign in to comment.