Last active
August 29, 2015 14:10
-
-
Save chris-roerig/bb7077e2e3ff742e5cdb to your computer and use it in GitHub Desktop.
A simple script to swap the hosts file
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
#!/bin/bash | |
case "$1" in | |
live) | |
cp /etc/hosts.live /etc/hosts | |
echo "Now using the live hosts file" | |
exit | |
;; | |
stage) | |
cp /etc/hosts.stage /etc/hosts | |
echo "Now using the stage hosts file" | |
exit | |
;; | |
*) | |
cp /etc/hosts.local /etc/hosts | |
echo "Now using the local hosts file" | |
exit | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment