Files
vms/distros/opensuse/tumbleweed/update.sh
T
Greg Hellings 88e74c95ed Fix Tumbleweed (hopefully)
Move Tumbleweed to using the Agama installer
Change it from fully dynamic to using the update script
2025-08-19 20:13:08 -05:00

25 lines
534 B
Bash
Executable File

#!env bash
set -exo pipefail
dir="$(cd "$(dirname "${0}")"; pwd)"
base="https://download.opensuse.org/repositories/systemsmanagement:/Agama:/Devel/images/iso/agama-installer.x86_64-17.0.0-openSUSE-Build6.13.iso"
# Working directory
tmp="$(mktemp -d)"
trap "rm -rf '${tmp}'" EXIT
checksums="${tmp}/checksums"
# Read the SHA256 sum value
sums="${base}.sha256"
until curl -f -L -o "${checksums}" "${sums}"; do
sleep 1
done
sha="$(cut -d' ' -f 1 "${checksums}")"
sed -E -i \
-e "s,( checksum *=).*$,\1 \"$sha\","
rm -r "${tmp}"