dotfiles/install.sh

22 lines
616 B
Bash
Raw Normal View History

2018-03-26 06:28:57 -07:00
#!/bin/bash
# Find all dot files then if the original file exists, create a backup
# Once backed up to {file}.dtbak symlink the new dotfile in place
for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
if [ -e ~/$file ]; then
mv -f ~/$file{,.dtbak}
fi
ln -s $PWD/$file ~/$file
done
# Check if vim-addon installed, if not, install it automatically
if hash vim-addon 2>/dev/null; then
echo "vim-addon (vim-scripts) installed"
else
echo "vim-addon (vim-scripts) not installed, installing"
sudo apt update && sudo apt -y install vim-scripts
2018-07-18 05:07:39 -07:00
fi
echo "Installed"