From f91469be86ed6e9b3a7000ad2de97cc3a03062d9 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 10 Nov 2024 18:30:56 +0100 Subject: [PATCH] minor hotfix --- configs/debian/bookworm_gnome.json | 2 +- configs/debian/bookworm_kde.json | 2 +- configs/debian/bookworm_server.json | 2 +- configs/ubuntu/noble_gnome.json | 2 +- configs/ubuntu/noble_kde.json | 2 +- configs/ubuntu/noble_server.json | 2 +- main.py | 18 +++++++++--------- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configs/debian/bookworm_gnome.json b/configs/debian/bookworm_gnome.json index 987fe55..fa41f93 100644 --- a/configs/debian/bookworm_gnome.json +++ b/configs/debian/bookworm_gnome.json @@ -4,7 +4,7 @@ "download_link": "http://deb.debian.org/debian/", "download_name": "bookworm", "packages": "grub-pc linux-image-amd64 task-gnome-desktop", - "script": [ + "scripts": [ "configs/scripts/install.sh" ], "package_manager": "apt" diff --git a/configs/debian/bookworm_kde.json b/configs/debian/bookworm_kde.json index fade86a..f984597 100644 --- a/configs/debian/bookworm_kde.json +++ b/configs/debian/bookworm_kde.json @@ -4,7 +4,7 @@ "download_link": "http://deb.debian.org/debian/", "download_name": "bookworm", "packages": "grub-pc linux-image-amd64 task-kde-desktop", - "script": [ + "scripts": [ "configs/scripts/install.sh" ], "package_manager": "apt" diff --git a/configs/debian/bookworm_server.json b/configs/debian/bookworm_server.json index 55ce54b..4b59806 100644 --- a/configs/debian/bookworm_server.json +++ b/configs/debian/bookworm_server.json @@ -4,7 +4,7 @@ "download_link": "http://deb.debian.org/debian/", "download_name": "bookworm", "packages": "nginx grub-pc linux-image-amd64", - "script": [ + "scripts": [ "configs/scripts/install.sh" ], "package_manager": "apt" diff --git a/configs/ubuntu/noble_gnome.json b/configs/ubuntu/noble_gnome.json index 5a8b308..8961025 100644 --- a/configs/ubuntu/noble_gnome.json +++ b/configs/ubuntu/noble_gnome.json @@ -4,7 +4,7 @@ "download_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz", "download_name": "noble-base-amd64.tar.gz", "packages": "grub-pc linux-image-generic ubuntu-desktop", - "script": [ + "scripts": [ "configs/scripts/install.sh" ], "package_manager": "apt" diff --git a/configs/ubuntu/noble_kde.json b/configs/ubuntu/noble_kde.json index ae0224a..5c56c61 100644 --- a/configs/ubuntu/noble_kde.json +++ b/configs/ubuntu/noble_kde.json @@ -4,7 +4,7 @@ "download_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz", "download_name": "noble-base-amd64.tar.gz", "packages": "grub-pc linux-image-generic kubuntu-desktop", - "script": [ + "scripts": [ "configs/scripts/install.sh" ], "package_manager": "apt" diff --git a/configs/ubuntu/noble_server.json b/configs/ubuntu/noble_server.json index 1598c2e..279ea14 100644 --- a/configs/ubuntu/noble_server.json +++ b/configs/ubuntu/noble_server.json @@ -4,7 +4,7 @@ "download_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz", "download_name": "noble-base-amd64.tar.gz", "packages": "nginx grub-pc linux-image-generic", - "script": [ + "scripts": [ "configs/scripts/install.sh" ], "package_manager": "apt" diff --git a/main.py b/main.py index 42e230a..2bb1790 100755 --- a/main.py +++ b/main.py @@ -123,20 +123,20 @@ def rootfs_package(identifier, scripts): # distro specific def ubuntu_rootfs_prepare( - download_link, download_name, packages, identifier, script, package_manager + download_link, download_name, packages, identifier, scripts, package_manager ): rootfs_downloader(download_link, download_name) - generic_rootfs_prepare(packages, identifier, script, package_manager) + generic_rootfs_prepare(packages, identifier, scripts, package_manager) def debian_rootfs_prepare( - download_link, download_name, packages, identifier, script, package_manager + download_link, download_name, packages, identifier, scripts, package_manager ): command(f"sudo debootstrap --arch amd64 {download_name} {chroot} {download_link}") - generic_rootfs_prepare(packages, identifier, script, package_manager) + generic_rootfs_prepare(packages, identifier, scripts, package_manager) -def generic_rootfs_prepare(packages, identifier, script, package_manager): +def generic_rootfs_prepare(packages, identifier, scripts, package_manager): prepare_chroot() do_chroot_command("apt update -y") do_chroot_command("apt full-upgrade -y") @@ -146,7 +146,7 @@ def generic_rootfs_prepare(packages, identifier, script, package_manager): do_chroot_command("echo 'localmachine' > /etc/hostname") close_chroot() rootfs_creator(f"{identifier}.tar.gz") - rootfs_package(f"{output}{identifier}", script) + rootfs_package(f"{output}{identifier}", scripts) # main @@ -196,7 +196,7 @@ def main(): download_name = data["download_name"] packages = data["packages"] identifier = data["identifier"] - script = data["script"] + scripts = data["scripts"] package_manager = data["package_manager"] match rootfs_type: @@ -206,7 +206,7 @@ def main(): download_name, packages, identifier, - script, + scripts, package_manager, ) case "debootstrap": @@ -215,7 +215,7 @@ def main(): download_name, packages, identifier, - script, + scripts, package_manager, )