From 1c845c3e1d544762147d1aed081bf0a5ffb46da3 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 22 Jun 2024 21:07:44 +0200 Subject: [PATCH] Add a script for generating the arch iso --- archiso/README.md | 6 ++++-- archiso/scripts/build.sh | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 archiso/scripts/build.sh diff --git a/archiso/README.md b/archiso/README.md index 1121abe5..f24060a2 100644 --- a/archiso/README.md +++ b/archiso/README.md @@ -23,10 +23,12 @@ nix develop To create a `.iso` file for installing Arch Linux, run the following command: ```sh -sudo mkarchiso . +./scripts/build.sh ``` -This will generate a `.iso` file in a new folder called `out`. This `.iso` file can be used for installing Arch Linux. +The script accepts all additional arguments which are accepted by the `mkarchiso` command. + +Running this script will generate a `.iso` file in a new folder called `out`. This `.iso` file can be used for installing Arch Linux. ### Updating This project also contains scripts for updating the files in case Arch Linux's `releng` template (the `archiso` template used by this project) changed. diff --git a/archiso/scripts/build.sh b/archiso/scripts/build.sh new file mode 100755 index 00000000..b73bf363 --- /dev/null +++ b/archiso/scripts/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash +contextRoot="$(mktemp -d)"; +rootHome="$contextRoot/airootfs/root"; +profileDir="/mnt/archiso-valhalla"; +mkdir -p "$rootHome"; +git clone .. "$rootHome/PortValhalla"; +sudo mount --mkdir -t overlay overlay -o lowerdir=.:"$contextRoot" "$profileDir"; +sudo mkarchiso "$@" "$profileDir"; +sudo umount "$profileDir";