Adds null checks to script

This commit is contained in:
William Carroll 2016-08-01 16:02:14 -04:00
parent 243cb92da9
commit ace1147a82
2 changed files with 7 additions and 2 deletions

BIN
usbify/vim/.DS_Store vendored

Binary file not shown.

View file

@ -22,9 +22,14 @@ if [ -L "$HOME/.vim" ]; then
else else
echo "Pointing to local machine. Toggling to USB..." echo "Pointing to local machine. Toggling to USB..."
# rename the current .vim directory and .vimrc # back-up local machine's .vim folder
mv "$HOME/.vim" "$HOME/.vim.bak" mv "$HOME/.vim" "$HOME/.vim.bak"
mv "$HOME/.vimrc" "$HOME/.vimrc.bak"
# back-up the local machine's .vimrc
if [ -f "HOME/.vimrc" ]; then
mv "$HOME/.vimrc" "$HOME/.vimrc.bak"
fi
# point the $HOME/.vim name to the USB for source routing # point the $HOME/.vim name to the USB for source routing
# use the USB drive's copy of .vimrc # use the USB drive's copy of .vimrc