Fix AutoPkg download

This commit is contained in:
Mykola Grymalyuk
2022-05-04 15:31:30 -06:00
parent 754a6c2a87
commit 5e5139855b
4 changed files with 21 additions and 12 deletions

View File

@@ -1581,10 +1581,16 @@ class wx_python_gui:
print("- Nightly Install.pkg is missing on Github, exiting")
return
if utilities.download_file(link, self.constants.installer_pkg_zip_path):
if Path(self.constants.installer_pkg_path).exists():
subprocess.run(["rm", self.constants.installer_pkg_path])
subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", self.constants.installer_pkg_zip_path, self.constants.payload_path])
if link.endswith(".zip"):
path = self.constants.installer_pkg_zip_path
else:
path = self.constants.installer_pkg_path
if utilities.download_file(link, path):
if str(path).endswith(".zip"):
if Path(self.constants.installer_pkg_path).exists():
subprocess.run(["rm", self.constants.installer_pkg_path])
subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", self.constants.installer_pkg_zip_path, self.constants.payload_path])
def install_installer_pkg(self, disk):
disk = disk + "s2" # ESP sits at 1, and we know macOS will have created the main partition at 2