diff options
| -rw-r--r-- | mkshrc | 11 | ||||
| -rw-r--r-- | shell/update | 11 |
2 files changed, 10 insertions, 12 deletions
@@ -368,14 +368,13 @@ updateshell() { updatevimrc() { OLDWD="$(pwd)" cd "$HOME" - git clone "$VIM_GIT_URL" .vim - if [ $? -gt 0 ] ; then - cd $HOME/.vim + git clone --recurse-submodules "$VIM_GIT_URL" .vim + exit="$?" + cd $HOME/.vim || { echo "Cannot cd to .vim dir" ; return; } + if [ "$exit" -gt 0 ] ; then git pull origin master - else - cd $HOME/.vim + git submodule update fi - ./setup.sh && \ ./link-vimrc.sh cd $OLDWD } diff --git a/shell/update b/shell/update index a5ad86b..a130285 100644 --- a/shell/update +++ b/shell/update @@ -83,14 +83,13 @@ updateshell() { updatevimrc() { OLDWD="$(pwd)" cd "$HOME" - git clone "$VIM_GIT_URL" .vim - if [ $? -gt 0 ] ; then - cd $HOME/.vim + git clone --recurse-submodules "$VIM_GIT_URL" .vim + exit="$?" + cd $HOME/.vim || { echo "Cannot cd to .vim dir" ; return; } + if [ "$exit" -gt 0 ] ; then git pull origin master - else - cd $HOME/.vim + git submodule update fi - ./setup.sh && \ ./link-vimrc.sh cd $OLDWD } |
