Skip to content

Commit 0a42645

Browse files
committed
Update script to handle version changes, and fail if not 13
1 parent 5b34a6c commit 0a42645

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

settings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
URL="https://cdimage.debian.org/debian-cd/13.0.0-live/amd64/iso-hybrid/debian-live-REPLACE_VERSION-amd64-standard.iso"
1+
URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-REPLACE_VERSION-amd64-standard.iso"
22
TYPE=file
33
CONTENTS="\
44
live/initrd.img|initrd

version.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/bash
22
set -e
3-
VERSION=$(curl -sfL https://cdimage.debian.org/debian-cd/13.0.0-live/amd64/iso-hybrid/SHA256SUMS | grep 'standard.iso' | grep -Po "(\d+\.)+\d+" | head -n1)
3+
4+
MAJOR_VERSION="13"
5+
6+
VERSION=$(curl -sfL https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/SHA256SUMS | grep 'standard.iso' | grep -Po "(\d+\.)+\d+" | head -n1)
7+
8+
if [[ "${VERSION}" != "${MAJOR_VERSION}."* ]]; then
9+
echo "Error: Version is not ${MAJOR_VERSION}. Exiting."
10+
exit 1
11+
fi
12+
413
echo "${VERSION}"

0 commit comments

Comments
 (0)