From 7ab7eea8c63c4ee221be0979d321ecb4271ae7e2 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 14 Sep 2015 16:12:55 +0000 Subject: [PATCH] Setting up the updater to run the bootstrapper with the update process. --- scripts/.update_dotfiles.sh | 7 ++++++- scripts/bootstrap.sh | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/.update_dotfiles.sh b/scripts/.update_dotfiles.sh index b3ddcc4..87b572e 100755 --- a/scripts/.update_dotfiles.sh +++ b/scripts/.update_dotfiles.sh @@ -2,7 +2,8 @@ # Need to move into the git directory to perform the checks opwd=$PWD -cd @GIT_DIR@ +GIT_DIR="@GIT_DIR@" +cd $GIT_DIR # Update the status of the origin # No need to print the result, this should be silent and invisible @@ -29,6 +30,10 @@ elif [ $LOCAL = $BASE ]; then git checkout master git pull git submodule update + + #Since we updated, we should execute the bootstrapper again. + . $GIT_DIR/scripts/bootstrap.sh + # Local changes exist, we need to push these before we can cleanly update elif [ $REMOTE = $BASE ]; then echo "Local changes, need to push before updating." diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 6fa2dc6..55eca10 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -5,6 +5,9 @@ # the provided ones already on the system. This script will backup any of the # existing dot files, before linking to the ones in this repository. # +# This script must be able to operate cleanly on an already bootstraped environment +# so as to update the system cleanly to new versions of the dotfiles repository. +# # Helper Functions