fix(startingpoint): add get_config_value and set_config_value to ublue-update.sh (#37)

This commit is contained in:
gerblesh 2023-09-12 10:39:40 -07:00 committed by GitHub
parent 9a3ceabc68
commit 5d03e9ff2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,15 @@
# Tell build process to exit if there are any errors.
set -oue pipefail
get_config_value() {
sed -n '/^'"$1"'=/{s/'"$1"'=//;p}'
}
set_config_value() {
CURRENT=$(get_config_value $1 $3)
sed -i 's/'"$1"'='"$CURRENT"'/'"$1"'='"$2"'/g' $3
}
# Check if ublue-os-update-services rpm is installed, these services conflict with ublue-update
if rpm -q ublue-os-update-services > /dev/null; then
rpm-ostree override remove ublue-os-update-services