diff --git a/makesymlinks.sh b/makesymlinks.sh index 9fcfe8a..1f3fe18 100755 --- a/makesymlinks.sh +++ b/makesymlinks.sh @@ -6,8 +6,8 @@ ########## Variables -dir=$(basename $0) # dotfiles directory -olddir=$(basename $0)_old # old dotfiles backup directory +dir=~/.dotfiles # dotfiles directory +olddir=~/.dotfiles_old # old dotfiles backup directory files=".tmux.conf .tmux.conf.local .vimrc .vim .tcshrc .bashrc .inputrc .git_completion" # list of files/folders to symlink in homedir ########## @@ -25,18 +25,18 @@ echo "...done" # move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks for file in $files; do echo "Moving any existing dotfiles from ~ to $olddir" - mv ~/$file ~/dotfiles_old/ > /dev/null 2>&1 + mv ~/$file ~/.dotfiles_old/ > /dev/null 2>&1 echo "Creating symlink to $file in home directory." ln -s $dir/$file ~/$file > /dev/null 2>&1 done # link Starship config to ~/.config/ if exists if [ -f ~/.config ]; then - ln -s ./starship.toml ~/.config/starship.toml + ln -s $dir/starship.toml ~/.config/starship.toml fi # copy example bashrc.local if one doesn't exist yet if [ ! -f ~/.bashrc.local ]; then - ln -s .bashrc.local ~/.bashrc.local + ln -s $file/.bashrc.local ~/.bashrc.local fi