aurora/build_files/base/05-override-install.sh
m2 f833e1f6a5
refactor: Reorganize Build Process (#1867)
Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com>
Co-authored-by: Benjamin Sherman <benjamin@holyarmy.org>
2024-11-05 04:13:24 +00:00

74 lines
2.3 KiB
Bash
Executable file

#!/usr/bin/bash
set -eoux pipefail
# Patched shells
if [[ "${BASE_IMAGE_NAME}" =~ silverblue ]]; then
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
gnome-shell
elif [[ "${BASE_IMAGE_NAME}" =~ kinoite ]]; then
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
kf6-kio-doc \
kf6-kio-widgets-libs \
kf6-kio-core-libs \
kf6-kio-widgets \
kf6-kio-file-widgets \
kf6-kio-core \
kf6-kio-gui
fi
# GNOME Triple Buffering
if [[ "${BASE_IMAGE_NAME}" =~ silverblue && "${FEDORA_MAJOR_VERSION}" -lt "41" ]]; then
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
mutter \
mutter-common
fi
# Fix for ID in fwupd
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
fwupd \
fwupd-plugin-flashrom \
fwupd-plugin-modem-manager \
fwupd-plugin-uefi-capsule-data
# Switcheroo patch
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:sentry:switcheroo-control_discrete \
switcheroo-control
rm /etc/yum.repos.d/_copr_sentry-switcheroo-control_discrete.repo
# Starship Shell Prompt
curl -Lo /tmp/starship.tar.gz "https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz"
tar -xzf /tmp/starship.tar.gz -C /tmp
install -c -m 0755 /tmp/starship /usr/bin
# shellcheck disable=SC2016
echo 'eval "$(starship init bash)"' >> /etc/bashrc
# Bash Prexec
curl -Lo /usr/share/bash-prexec https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh
# Topgrade Install
pip install --prefix=/usr topgrade
# Install ublue-update -- breaks with packages.json due to missing topgrade
rpm-ostree install ublue-update
# Consolidate Just Files
find /tmp/just -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; >> /usr/share/ublue-os/just/60-custom.just
# Move over ublue-update config
mv -f /tmp/ublue-update.toml /usr/etc/ublue-update/ublue-update.toml
# Register Fonts
fc-cache -f /usr/share/fonts/ubuntu
fc-cache -f /usr/share/fonts/inter