Update get-iso

This commit is contained in:
root 2023-12-07 08:05:57 +01:00
parent afe4879f87
commit ca0fb8e023

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# @linux-aarhus - root.nix.dk # @linux-aarhus - root.nix.dk
# License: GNU GPL, version 3 or later; https://www.gnu.org/licenses/gpl.html # License: GNU GPL, version 3 or later; <https://www.gnu.org/licenses/gpl.html>
import argparse import argparse
import shutil import shutil
import subprocess import subprocess
@ -17,7 +17,7 @@ from pathlib import Path
DEF_URL = "https://gitlab.manjaro.org/webpage/iso-info/-/raw/master/file-info.json" DEF_URL = "https://gitlab.manjaro.org/webpage/iso-info/-/raw/master/file-info.json"
FOLDER = Path.home() FOLDER = Path.home()
PROG_NAME = os.path.basename(__file__) PROG_NAME = os.path.basename(__file__)
PROG_VERSION = "0.2" PROG_VERSION = "0.3"
GNU_URL = "https://www.gnu.org/licenses/gpl.html" GNU_URL = "https://www.gnu.org/licenses/gpl.html"
REVIEW_URL = "https://api.github.com/repos/manjaro/release-review/releases/latest" REVIEW_URL = "https://api.github.com/repos/manjaro/release-review/releases/latest"
review_editions = ["gnome", "kde", "xfce"] review_editions = ["gnome", "kde", "xfce"]
@ -181,7 +181,6 @@ def main():
subprocess.run(["7z", "-y", "t", f"{zipname}"], cwd=f"{FOLDER}") subprocess.run(["7z", "-y", "t", f"{zipname}"], cwd=f"{FOLDER}")
print("Wait for checksum to complete ...") print("Wait for checksum to complete ...")
subprocess.run(["sha256sum", "-c", f"{shaname}"], cwd=f"{FOLDER}") subprocess.run(["sha256sum", "-c", f"{shaname}"], cwd=f"{FOLDER}")
time.sleep(5)
else: else:
print("Download failied") print("Download failied")
sys.exit(1) sys.exit(1)
@ -193,7 +192,8 @@ def main():
if sig_result and iso_result: if sig_result and iso_result:
print("Wait for verification to complete ...") print("Wait for verification to complete ...")
time.sleep(5) time.sleep(5)
subprocess.run(["gpg", "--verify", f'{iso["sig"].split("/")[-1]}'], cwd=f"{FOLDER}") subprocess.run(["gpg", "--verify", f'{iso["sig"].split("/")[-1]}'],
cwd=f"{FOLDER}")
else: else:
print("Download failed") print("Download failed")
sys.exit(1) sys.exit(1)