Hyperv Debian + UEFI
This commit is contained in:
@@ -58,7 +58,11 @@ def get_parser(args, unsupported=set()):
|
||||
|
||||
def main():
|
||||
# Equivalent of `set -e` in Bash
|
||||
#$RAISE_SUBPROC_ERROR = True
|
||||
$RAISE_SUBPROC_ERROR = True
|
||||
if len(sys.argv) == 2:
|
||||
dry_run = True
|
||||
else:
|
||||
dry_run = False
|
||||
for box in g`output/**/*.box`:
|
||||
p = pathlib.Path(box)
|
||||
with open("Vagrantfile.in", "r") as fr:
|
||||
@@ -67,16 +71,17 @@ def main():
|
||||
content = content.replace("@@BOX_NAME@@", p.name)
|
||||
with open("Vagrantfile", "w") as fw:
|
||||
fw.write(content)
|
||||
vagrant box add @(box) --name @(p.name)
|
||||
if str(p.parent.name) in ["virtualbox", "libvirt", "vmware", "hyperv"]:
|
||||
vagrant up --provider @(p.parent.name)
|
||||
else:
|
||||
print(f"Now whatcha wanna go and do that for? {box}")
|
||||
continue
|
||||
vagrant destroy -f
|
||||
vag_folder = pathlib.Path(".vagrant")
|
||||
if vag_folder.exists():
|
||||
rmtree(vag_folder)
|
||||
if not dry_run:
|
||||
vagrant box add @(box) --name @(p.name) --force
|
||||
if str(p.parent.name) in ["virtualbox", "libvirt", "vmware", "hyperv"]:
|
||||
vagrant up --provider @(p.parent.name)
|
||||
else:
|
||||
print(f"Now whatcha wanna go and do that for? {box}")
|
||||
continue
|
||||
vagrant destroy -f
|
||||
vag_folder = pathlib.Path(".vagrant")
|
||||
if vag_folder.exists():
|
||||
rmtree(vag_folder)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user