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
| 'use strict'; | |
| /** | |
| * Simple deployment script. | |
| * | |
| * Run it through: | |
| * $ npm run deploy | |
| * | |
| * Note that the script will add all files to remote server without doing diffs | |
| * or anything. It behaves pretty much like rsync. |
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
| # remove specified host from /etc/hosts | |
| function removehost() { | |
| if [[ "$1" ]] | |
| then | |
| HOSTNAME=$1 | |
| if [ -n "$(grep $HOSTNAME /etc/hosts)" ] | |
| then | |
| echo "$HOSTNAME Found in your /etc/hosts, Removing now..."; | |
| sudo sed -i".bak" "/$HOSTNAME/d" /etc/hosts |
OlderNewer