agama/live/root/usr/bin/agama-self-update
Imobach González Sosa f34ed45eae
Apply suggestions from code review
Co-authored-by: Ladislav Slezák <lslezak@suse.com>
2024-07-19 11:05:26 +01:00

27 lines
815 B
Bash
Executable file

#! /bin/sh
# Experimental Agama self-update script
#
# This script updates the Agama packages in the Live system from the
# Agama Devel OBS project.
# first try a quick and simple solution, refreshing the distributions repository takes a
# lot of time so try using only the agama-devel for update
zypper modifyrepo --disable --all
zypper modifyrepo --enable agama-devel
zypper refresh
zypper --non-interactive dup --details --from agama-devel
STATUS=$?
# enable all repositories back
zypper modifyrepo --enable --all
# if it failed try it again with all the repos enabled, maybe there was some
# dependency problem which hopefully will be OK now
if [ "$?" != "0" ]; then
zypper --non-interactive dup --details --from agama-devel
fi
# clean all repository caches to save space in RAM disk
zypper clean --all