Updates to the x86_64 image build.

This commit is contained in:
Storm Dragon
2025-11-20 15:32:22 -05:00
parent a7e28c018f
commit 68cbe3c0bb
8 changed files with 1062 additions and 0 deletions

View File

@@ -54,6 +54,9 @@ if [ "$(whoami)" != "root" ]; then
exit 1
fi
# Capture the calling user for chown later
callingUser="${SUDO_USER:-$USER}"
# Check for required tools
for tool in mkarchiso pacman; do
if ! command -v "$tool" &> /dev/null; then
@@ -105,6 +108,24 @@ fi
# Build the ISO
mkarchiso -v -w "$work_dir" -o "$output_dir" "$script_dir"
# Generate sha1sum for the ISO
echo
echo "Generating sha1sum..."
pushd "$output_dir" > /dev/null
for isoFile in *.iso; do
if [ -f "$isoFile" ]; then
sha1sum "$isoFile" > "${isoFile}.sha1sum"
echo "Created sha1sum: ${isoFile}.sha1sum"
fi
done
popd > /dev/null
# Change ownership of output directory to calling user
if [ -n "$callingUser" ] && [ "$callingUser" != "root" ]; then
echo "Changing ownership of $output_dir to $callingUser..."
chown -R "$callingUser:$callingUser" "$output_dir"
fi
echo
echo "Build complete!"
echo "ISO file is in: $output_dir"