bazzite/build_files/finalize
2025-01-12 22:14:09 -08:00

16 lines
410 B
Bash
Executable File

#!/usr/bin/bash
set -eoux 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