Files
fluffy-pancake/build/10-build.sh
T

69 lines
1.9 KiB
Bash
Raw Normal View History

2026-02-17 17:27:26 +01:00
#!/usr/bin/bash
set -eoux pipefail
###############################################################################
# Main Build Script
###############################################################################
# This script follows the @ublue-os/bluefin pattern for build scripts.
# It uses set -eoux pipefail for strict error handling and debugging.
###############################################################################
# Source helper functions
# shellcheck source=/dev/null
source /ctx/build/copr-helpers.sh
# Enable nullglob for all glob operations to prevent failures on empty matches
shopt -s nullglob
echo "::group:: Copy Bluefin Config from Common"
# Copy just files from @projectbluefin/common (includes 00-entry.just which imports 60-custom.just)
mkdir -p /usr/share/ublue-os/just/
shopt -s nullglob
cp -r /ctx/oci/common/bluefin/usr/share/ublue-os/just/* /usr/share/ublue-os/just/
shopt -u nullglob
echo "::endgroup::"
echo "::group:: Copy Custom Files"
# Copy Brewfiles to standard location
mkdir -p /usr/share/ublue-os/homebrew/
cp /ctx/custom/brew/*.Brewfile /usr/share/ublue-os/homebrew/
# Consolidate Just Files
find /ctx/custom/ujust -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; >> /usr/share/ublue-os/just/60-custom.just
# Copy Flatpak preinstall files
mkdir -p /etc/flatpak/preinstall.d/
cp /ctx/custom/flatpaks/*.preinstall /etc/flatpak/preinstall.d/
echo "::endgroup::"
echo "::group:: Install Packages"
# Install packages using dnf5
2026-02-17 18:43:19 +01:00
dnf5 install -y \
fastfetch \
btop \
2026-02-17 17:27:26 +01:00
# Example using COPR with isolated pattern:
2026-02-17 18:43:19 +01:00
copr_install_isolated "ryanabx/cosmic-epoch" cosmic-desktop
2026-02-17 17:27:26 +01:00
echo "::endgroup::"
echo "::group:: System Configuration"
# Enable/disable systemd services
systemctl enable podman.socket
# Example: systemctl mask unwanted-service
echo "::endgroup::"
# Restore default glob behavior
shopt -u nullglob
echo "Custom build complete!"