bazzite/build_files/finalize
Kyle Gospodnetich 38d69145e1 feat: Switch to dnf5 for container builds
feat: Use Terra repos
2025-01-11 23:26:40 -08:00

15 lines
408 B
Bash
Executable File

#!/usr/bin/bash
set -oue pipefail
dnf5 clean all
rm -rf /tmp/* || true
mv /var/lib/alternatives /staged-alternatives
find /var/* -maxdepth 0 -type d \! -name cache -exec rm -fr {} \;
find /var/cache/* -maxdepth 0 -type d \! -name libdnf5 \! -name rpm-ostree -exec rm -fr {} \;
mkdir -p /var/lib
mv /staged-alternatives /var/lib/alternatives
mkdir -p /var/tmp
chmod -R 1777 /var/tmp
ostree container commit