Skip to content

Commit

Permalink
Take care of updated local global variables (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojacques authored Mar 22, 2017
1 parent d5e3c8a commit c700f78
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions vagrant/scripts/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ if [ $1 = "--local" ]; then
# Force reset local GIT repo to match Github
git fetch --all
git reset --hard origin/master

# Exclude global variables from rsync, but create if it doesn't exist
if [ ! -f "/provision/vars/default.yml" ]; then
cp vagrant/provision/vars/default.yml /provision/vars/default.yml
fi

# Stick to branch in vars/default.yml
github_branch=`awk '/github_branch/ {printf "%s",$2;exit}' vagrant/provision/vars/default.yml`
github_branch=`awk '/github_branch/ {printf "%s",$2;exit}' /provision/vars/default.yml`
git checkout ${github_branch}
sudo rsync -aHAXvh --update vagrant/provision /

sudo rsync -aHAXvh --update --exclude 'vagrant/provision/vars/default.yml' vagrant/provision /
shift
fi

Expand Down

0 comments on commit c700f78

Please sign in to comment.