diff --git a/usbify/vim/.DS_Store b/usbify/vim/.DS_Store deleted file mode 100644 index d30ee2020..000000000 Binary files a/usbify/vim/.DS_Store and /dev/null differ diff --git a/usbify/vim/vim_point_to_usb.sh b/usbify/vim/vim_point_to_usb.sh index e2faa9d9b..98369170f 100755 --- a/usbify/vim/vim_point_to_usb.sh +++ b/usbify/vim/vim_point_to_usb.sh @@ -22,9 +22,14 @@ if [ -L "$HOME/.vim" ]; then else 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/.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 # use the USB drive's copy of .vimrc