added optional out_dir

This commit is contained in:
Frede Hundewadt 2024-01-05 14:42:14 +01:00
parent 2050a1847c
commit 99990b7932
1 changed files with 5 additions and 5 deletions

10
get-iso
View File

@ -288,12 +288,12 @@ def main():
if zip_result and sha_result:
subprocess.run(["7z", "-y", "t", f"{zipfile}"],
cwd=f"{FOLDER}")
cwd=f"{out_dir}")
subprocess.run(["7z", "-y", "x", f"{zipfile}"],
cwd=f"{FOLDER}")
cwd=f"{out_dir}")
print("\nWait for checksum to complete ...")
subprocess.run(["sha256sum", "-c", f"{shafile}"],
cwd=f"{FOLDER}")
cwd=f"{out_dir}")
else:
print("Download failied")
sys.exit(1)
@ -305,11 +305,11 @@ def main():
if sig_result and iso_result:
print("Wait for verification to complete ...")
subprocess.run(["gpg", "--verify", f'{iso["sig"].split("/")[-1]}'],
cwd=f"{FOLDER}")
cwd=f"{out_dir}")
else:
print("Download failed")
sys.exit(1)
print("Finished downloading. Results saved in {}".format(out_dir))
print("Finished downloading ISO to '{}'".format(out_dir))
sys.exit(0)