Hardcode install directory for now
This commit is contained in:
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
########## Variables
|
########## Variables
|
||||||
|
|
||||||
dir=$(basename $0) # dotfiles directory
|
dir=~/.dotfiles # dotfiles directory
|
||||||
olddir=$(basename $0)_old # old dotfiles backup 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
|
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
|
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
echo "Moving any existing dotfiles from ~ to $olddir"
|
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."
|
echo "Creating symlink to $file in home directory."
|
||||||
ln -s $dir/$file ~/$file > /dev/null 2>&1
|
ln -s $dir/$file ~/$file > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
# link Starship config to ~/.config/ if exists
|
# link Starship config to ~/.config/ if exists
|
||||||
if [ -f ~/.config ]; then
|
if [ -f ~/.config ]; then
|
||||||
ln -s ./starship.toml ~/.config/starship.toml
|
ln -s $dir/starship.toml ~/.config/starship.toml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy example bashrc.local if one doesn't exist yet
|
# copy example bashrc.local if one doesn't exist yet
|
||||||
if [ ! -f ~/.bashrc.local ]; then
|
if [ ! -f ~/.bashrc.local ]; then
|
||||||
ln -s .bashrc.local ~/.bashrc.local
|
ln -s $file/.bashrc.local ~/.bashrc.local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user