From 16ecbdf5c5b15f5ff4edbc257a35f02332511b29 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 7 May 2025 22:46:59 +0300 Subject: [PATCH] deb-update.bash: initial support for Fedora Atomic to enable my laziness --- bash/deb-update.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bash/deb-update.bash b/bash/deb-update.bash index 608939b..56d1628 100755 --- a/bash/deb-update.bash +++ b/bash/deb-update.bash @@ -38,7 +38,8 @@ if hash fedora-third-party 2> /dev/null; then fedora-third-party query fi -if hash dnf 2> /dev/null; then +# TODO: Better way of identifying Fedora Atomic! There is the overlayfs thing? +if [[ -f /usr/bin/dnf && ! -d /var/roothome ]]; then # I don't know if -y does anything here either and I think this may be # useless, but I am used to it coming from apt and I think it will just # say nothing to do or do nothing if mirrors haven't updated. @@ -56,6 +57,9 @@ if hash dnf 2> /dev/null; then # potentially unsafe, see a few lines above and the apt-get section dnf "$@" autoremove + # TODO: Better way of identifying Fedora Atomic! There is the overlayfs thing? +elif [[ -f /usr/bin/rpm-ostree && -d /var/roothome ]]; then + rpm-ostree upgrade fi # Arch Linux package management