mirror of
https://github.com/KDE/kde-linux.git
synced 2026-05-19 14:04:06 -04:00
Simplify mkosi.postinst.chroot
We define a function, immediately call it, and never use it again. This can be simplified to reduce a level of nesting and indirection.
This commit is contained in:
@@ -63,46 +63,43 @@ EOF
|
||||
[ -f /usr/lib/os-release ] || false
|
||||
cat /usr/lib/os-release
|
||||
|
||||
download_flatpaks() {
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
# Do this separately, when used as part of remote-add it complains about GPG for unknown reasons
|
||||
flatpak remote-modify --collection-id=org.flathub.Stable flathub
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
# Do this separately, when used as part of remote-add it complains about GPG for unknown reasons
|
||||
flatpak remote-modify --collection-id=org.flathub.Stable flathub
|
||||
|
||||
# Only check out en. We don't really support other languages on the live image at this time.
|
||||
flatpak config --set languages en
|
||||
# Only check out en. We don't really support other languages on the live image at this time.
|
||||
flatpak config --set languages en
|
||||
|
||||
kde_nightly=(
|
||||
ark
|
||||
gwenview
|
||||
kcalc
|
||||
haruna
|
||||
okular
|
||||
qrca
|
||||
)
|
||||
kde_nightly=(
|
||||
ark
|
||||
gwenview
|
||||
kcalc
|
||||
haruna
|
||||
okular
|
||||
qrca
|
||||
)
|
||||
|
||||
# Add Nightly repos
|
||||
for app in "${kde_nightly[@]}"; do
|
||||
flatpak remote-add --if-not-exists "${app}-nightly" \
|
||||
"https://cdn.kde.org/flatpak/${app}-nightly/${app}-nightly.flatpakrepo"
|
||||
done
|
||||
# Add Nightly repos
|
||||
for app in "${kde_nightly[@]}"; do
|
||||
flatpak remote-add --if-not-exists "${app}-nightly" \
|
||||
"https://cdn.kde.org/flatpak/${app}-nightly/${app}-nightly.flatpakrepo"
|
||||
done
|
||||
|
||||
# Flatpak ignores repo priorities, prompting for remote selection.
|
||||
# Looping avoids this and keeps automation working.
|
||||
# Issue: https://github.com/flatpak/flatpak/issues/5421
|
||||
for app in "${kde_nightly[@]}"; do
|
||||
flatpak install --or-update --noninteractive --assumeyes "${app}-nightly" "org.kde.${app}"
|
||||
done
|
||||
# Flatpak ignores repo priorities, prompting for remote selection.
|
||||
# Looping avoids this and keeps automation working.
|
||||
# Issue: https://github.com/flatpak/flatpak/issues/5421
|
||||
for app in "${kde_nightly[@]}"; do
|
||||
flatpak install --or-update --noninteractive --assumeyes "${app}-nightly" "org.kde.${app}"
|
||||
done
|
||||
|
||||
# Install KWrite from Flathub for now, until it has a nightly repo.
|
||||
flatpak install --or-update --noninteractive --assumeyes flathub \
|
||||
org.gtk.Gtk3theme.Breeze \
|
||||
org.kde.kwrite \
|
||||
org.mozilla.firefox
|
||||
# Install KWrite from Flathub for now, until it has a nightly repo.
|
||||
flatpak install --or-update --noninteractive --assumeyes flathub \
|
||||
org.gtk.Gtk3theme.Breeze \
|
||||
org.kde.kwrite \
|
||||
org.mozilla.firefox
|
||||
|
||||
# And restore default
|
||||
flatpak config --unset languages
|
||||
}
|
||||
download_flatpaks
|
||||
# And restore default
|
||||
flatpak config --unset languages
|
||||
|
||||
# Fetch latest distrobox config from the kde-linux-containers repo
|
||||
mkdir -p /usr/share/distrobox
|
||||
|
||||
Reference in New Issue
Block a user