Skip to content

Instantly share code, notes, and snippets.

@kacpak
Last active February 17, 2016 20:29
Show Gist options
  • Save kacpak/b3a13ef1a32f5d77a39a to your computer and use it in GitHub Desktop.
Save kacpak/b3a13ef1a32f5d77a39a to your computer and use it in GitHub Desktop.
Homestead z dowolnego miejsca
@ECHO OFF
SETLOCAL
if [%1]==[] (
echo Vagrant: Homestead
echo up uruchamia maszyne wirtualna
echo down zatrzymuje maszyne wirtualna
echo destroy niszczy maszyne wirtualna
echo ssh loguje sie do maszyny poprzez ssh
echo conf otwiera plik konfiguracyjny .yaml
echo hosts otwiera systemowy plik etc/hosts
goto :exit
)
PUSHD %homedrive%%homepath%\Homestead
if "%~1"=="up" (
vagrant up
) else if "%~1"=="down" (
vagrant halt
) else if "%~1"=="destroy" (
vagrant destroy --force
) else if "%~1"=="ssh" (
vagrant ssh
) else if "%~1"=="conf" (
start %homedrive%%homepath%\.homestead\Homestead.yaml
) else if "%~1"=="hosts" (
start %SystemRoot%\System32\drivers\etc\hosts
)
POPD
:exit
ENDLOCAL
ECHO ON
@EXIT /B 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment