Files
omarchy-iso/build_iso.sh
T
2025-07-27 17:15:21 +02:00

37 lines
912 B
Bash
Executable File

#!/bin/bash
set -e
pacman-key --init
pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Sy archiso git
# Packages to add to the archiso profile packages
# As a base example (the TUI packages needs to be here)
packages=(
git
impala
)
cache_dir=$(realpath --canonicalize-missing ~/.cache/omarchy/iso_$(date +%Y-%m-%d))
mkdir -p $cache_dir/
cp -r archiso/configs/releng/* $cache_dir/
# We add in our auto-start applications
# We'll assume the TUI installer is called omarchy-tui for now
cat <<- _EOF_ | tee $cache_dir/airootfs/root/.zprofile
omarchy-tui
_EOF_
# Add packages to the archiso profile packages
for package in "${packages[@]}"; do
echo "$package" >> "$cache_dir/packages.x86_64"
done
# We patch grub to our liking:
(cd $cache_dir/ && git apply /grub-autoboot.patch)
# We could also use:
# patch -p1 < grub-autoboot.patch
mkarchiso -v -w "$cache_dir/work/" -o "/out/" "$cache_dir/"