Vagrant Up or Provision if already Up
I need to create a simple script (Windows .bat) that will provision or up
a box.
Not much experience with .bat files, so this is what I have so far:
cd C:\Users\Craig Nagler\Documents\GitHub\frusa-vagrant\
call vagrant-up.bat
if errorlevel 0 goto endOkay
call vagrant-provision.bat
:endOkay
The .bat files called in the script just contain one line: vagrant up and
vagrant reload, respectively.
When the vagrant box is down, then vagrant up runs successfully. When up,
I encounter an error with vagrant up (which I expect) but the whole batch
file dies there. ErrorLevel doesn't appear to do anything.
No comments:
Post a Comment