Files
cloudhost/seediso/windows11/build-seed.sh
T
GuofangandClaude Sonnet 5.5 ca716d2b61 Include the numbered installer batch files in the Windows 11 seed ISO
The launcher also rebuilds the seed ISO when one of them changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 13:57:19 +08:00

27 lines
914 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
output="${1:-${script_dir}/seed.iso}"
seed_files=(
"$script_dir/Autounattend.xml"
"$script_dir/Configure-Windows.ps1"
)
# Numbered installer scripts (10-Install-Git.bat, 20-..., in install order).
shopt -s nullglob
seed_files+=("$script_dir"/[0-9][0-9]-*.bat)
shopt -u nullglob
mkdir -p "$(dirname -- "$output")"
if command -v xorriso >/dev/null 2>&1; then
xorriso -as mkisofs -quiet -o "$output" -V CIDATA -J -r "${seed_files[@]}"
elif command -v genisoimage >/dev/null 2>&1; then
genisoimage -quiet -o "$output" -V CIDATA -J -r "${seed_files[@]}"
elif command -v mkisofs >/dev/null 2>&1; then
mkisofs -quiet -o "$output" -V CIDATA -J -r "${seed_files[@]}"
else
printf 'Error: install xorriso, genisoimage, or mkisofs.\n' >&2
exit 1
fi
printf 'Built Windows 11 answer-file ISO: %s\n' "$output"