Created
June 3, 2014 21:23
-
-
Save nobleach/d196eabe801ad2789fb6 to your computer and use it in GitHub Desktop.
Quick nasty hosts file swiitch
This file contains 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
HOSTS_FILE="/etc/hosts" | |
PRISTENE_HOSTS="$HOME/hosts-clean" | |
TEST_ENV_HOSTS="$HOME/hosts-test" | |
function switchhosts { | |
if [ $1 = "prod" ] | |
then | |
sudo cp "$PRISTENE_HOSTS" "$HOSTS_FILE" | |
fi | |
if [ $1 = "test" ]; then | |
sudo cp "$TEST_ENV_HOSTS" "$HOSTS_FILE" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment