about summary refs log tree commit diff
path: root/usbify
diff options
context:
space:
mode:
Diffstat (limited to 'usbify')
-rw-r--r--usbify/vim/.DS_Storebin6148 -> 0 bytes
-rwxr-xr-xusbify/vim/vim_point_to_usb.sh9
2 files changed, 7 insertions, 2 deletions
diff --git a/usbify/vim/.DS_Store b/usbify/vim/.DS_Store
deleted file mode 100644
index d30ee2020845..000000000000
--- a/usbify/vim/.DS_Store
+++ /dev/null
Binary files differdiff --git a/usbify/vim/vim_point_to_usb.sh b/usbify/vim/vim_point_to_usb.sh
index e2faa9d9bf6d..98369170ffec 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