Skip to content

Instantly share code, notes, and snippets.

@vmitchell85
Created January 6, 2017 13:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vmitchell85/5303672e2d4ff0468b5315f272c8610d to your computer and use it in GitHub Desktop.
Windows Git Bash functions
hsp(){
cd "/c/Users/vlm/Homestead"
vagrant provision
}
hsadd(){
curfolder=${PWD##*/}
echo "192.168.10.10 ${curfolder}.dev" >> "/c/Windows/System32/drivers/etc/hosts"
sed -i "/sites:/a \ \ \ \ - map: ${curfolder}.dev\r\n\ \ \ \ \ \ to: /home/vagrant/code/${curfolder}/public" "/c/Users/vlm/.homestead/Homestead.yaml"
sed -i "/databases:/a \ \ \ \ - ${curfolder}" "/c/Users/vlm/.homestead/Homestead.yaml"
hsp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment