aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-11-13 21:39:46 -0500
committerMitch Riedstra <mitch@riedstra.us>2019-11-13 21:39:46 -0500
commit9b14f8764d936068105872de717a67f86dfc9eb2 (patch)
treeb6f882b2d55b7becb24f6a954cd36331381b2062
parentcce528a53d1bd06d0e466dbc2019fcc34e1deee5 (diff)
downloaddotfiles-9b14f8764d936068105872de717a67f86dfc9eb2.tar.gz
dotfiles-9b14f8764d936068105872de717a67f86dfc9eb2.tar.xz
Update the vimrc updater to use the submodules
-rw-r--r--mkshrc11
-rw-r--r--shell/update11
2 files changed, 10 insertions, 12 deletions
diff --git a/mkshrc b/mkshrc
index a5e1216..e107b2b 100644
--- a/mkshrc
+++ b/mkshrc
@@ -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
}