Browse Source

Setting up the updater to run the bootstrapper with the update process.

master
Drew Short 9 years ago
parent
commit
7ab7eea8c6
  1. 7
      scripts/.update_dotfiles.sh
  2. 3
      scripts/bootstrap.sh

7
scripts/.update_dotfiles.sh

@ -2,7 +2,8 @@
# Need to move into the git directory to perform the checks # Need to move into the git directory to perform the checks
opwd=$PWD opwd=$PWD
cd @GIT_DIR@
GIT_DIR="@GIT_DIR@"
cd $GIT_DIR
# Update the status of the origin # Update the status of the origin
# No need to print the result, this should be silent and invisible # No need to print the result, this should be silent and invisible
@ -29,6 +30,10 @@ elif [ $LOCAL = $BASE ]; then
git checkout master git checkout master
git pull git pull
git submodule update 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 # Local changes exist, we need to push these before we can cleanly update
elif [ $REMOTE = $BASE ]; then elif [ $REMOTE = $BASE ]; then
echo "Local changes, need to push before updating." echo "Local changes, need to push before updating."

3
scripts/bootstrap.sh

@ -5,6 +5,9 @@
# the provided ones already on the system. This script will backup any of the # 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. # 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 # Helper Functions

Loading…
Cancel
Save