Last active
March 26, 2019 09:16
-
-
Save sola-msr/8ae76ae2efc6b9c8ede347b8449e1011 to your computer and use it in GitHub Desktop.
【Vagrant】Windows上でVagrantをワンクリックで起動させるバッチ「Vagrant Launcher」 ref: https://qiita.com/sola-msr/items/efdf2268cba838ea0dfe
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
@echo off | |
REM -------------- | |
REM config file | |
REM -------------- | |
cd /d %~dp0 | |
REM Directory with virtualization software (VirtualBox.exe) | |
REM (* It may be possible to use VMware, but I have not tried it.) | |
SET VIRTUALIZATIONSOFTWARE_DIR= | |
REM Project directory | |
SET PROJECT_DIR= |
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
SET VIRTUALIZATIONSOFTWARE_DIR=C:\Program Files\Oracle\VirtualBox |
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
@echo off | |
REM Vagrant Launcher | |
CALL config.bat | |
echo **** Vagrant Launcher **** | |
echo Vagrant Launcher is executeing... | |
cd /d %~dp0 | |
cd %VIRTUALIZATIONSOFTWARE_DIR% | |
REM * By default it is written assuming to use VirtualBox. | |
start VirtualBox.exe | |
cd %PROJECT_DIR% | |
echo vagrant up command execute. | |
vagrant up | |
cmd /k cd %PROJECT_DIR% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment