Hyperv Debian + UEFI

This commit is contained in:
Greg Hellings
2023-12-30 05:37:32 +00:00
parent 76abdb9132
commit b11669345e
112 changed files with 468 additions and 850 deletions
+16 -11
View File
@@ -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__':