Last active
August 29, 2015 14:06
-
-
Save echohack/9252a6dc4fb1e807ddad to your computer and use it in GitHub Desktop.
Shell script for quickly changing which chef server your toolset points to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Only tested on Mac OSX 10.10 | |
if [ -d ~/.chef_pp ]; then | |
echo "Changing to Pre-Production Chef Environment." | |
mv ~/.chef ~/.chef_sandbox | |
mv ~/.berkshelf ~/.berkshelf_sandbox | |
mv ~/.chef_pp ~/.chef | |
mv ~/.berkshelf_pp ~/.berkshelf | |
elif [ -d ~/.chef_sandbox ]; then | |
echo "Changing to Sandbox Chef Environment." | |
mv ~/.chef ~/.chef_pp | |
mv ~/.berkshelf ~/.berkshelf_pp | |
mv ~/.chef_sandbox ~/.chef | |
mv ~/.berkshelf_sandbox ~/.berkshelf | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment