From 243cb92da9e8a0f46cbe1bd36ad4ea14037ab57a Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 1 Aug 2016 15:46:24 -0400 Subject: [PATCH] Updates script to use symlink instead of file copy --- usbify/vim/vim_point_to_usb.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usbify/vim/vim_point_to_usb.sh b/usbify/vim/vim_point_to_usb.sh index 00c428930..e2faa9d9b 100755 --- a/usbify/vim/vim_point_to_usb.sh +++ b/usbify/vim/vim_point_to_usb.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +path_to_ext_device="/Volumes/usb_vim" + # This script toggles between local vim and a version that can be stored on an # external device like a USB. @@ -26,10 +28,10 @@ else # point the $HOME/.vim name to the USB for source routing # use the USB drive's copy of .vimrc - ln -s /Volumes/Untitled\ 1/.vim "$HOME/.vim" - cp /Volumes/Untitled\ 1/.vimrc "$HOME/" + ln -s "${path_to_ext_device}/.vim" "$HOME/.vim" + ln -s "${path_to_ext_device}/.vimrc" "$HOME/.vimrc" - echo ".vim now points to /Volumes/Untitled\ 1/.vim" + echo ".vim now points to ${path_to_ext_device}/.vim" fi echo "Done."