From e11f90482a5a2742aca4d1e8548e1daee4d50131 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Mon, 18 Aug 2025 01:19:00 -0500 Subject: [PATCH] Add Debian update scripts --- distros/debian/11/update.sh | 17 +++++++++++++++++ distros/debian/12/update.sh | 17 +++++++++++++++++ distros/debian/13/update.sh | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100755 distros/debian/11/update.sh create mode 100755 distros/debian/12/update.sh create mode 100755 distros/debian/13/update.sh diff --git a/distros/debian/11/update.sh b/distros/debian/11/update.sh new file mode 100755 index 0000000..afdcac7 --- /dev/null +++ b/distros/debian/11/update.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +root="$(cd "$(dirname "$0")"; pwd)" +hcl="$root/amd64.pkrvars.hcl" + +base="https://cdimage.debian.org/cdimage/archive/latest-oldoldstable/arm64/iso-cd/" + +sums="$(curl -L "$base/SHA256SUMS")" + +sha="$(echo "$sums" | awk '{print $1}')" +file="$(echo "$sums" | awk '{print $2}')" + +echo "Found $file with sum $sha" + +sed -i "$hcl" -E \ + -e "s,( url *=).*$,\1 \"$base$file\"," \ + -e "s,( checksum *=).*$,\1 \"$sha\"," diff --git a/distros/debian/12/update.sh b/distros/debian/12/update.sh new file mode 100755 index 0000000..493738a --- /dev/null +++ b/distros/debian/12/update.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +root="$(cd "$(dirname "$0")"; pwd)" +hcl="$root/amd64.pkrvars.hcl" + +base="https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-cd/" + +sums="$(curl -L "$base/SHA256SUMS")" + +sha="$(echo "$sums" | awk '{print $1}')" +file="$(echo "$sums" | awk '{print $2}')" + +echo "Found $file with sum $sha" + +sed -i "$hcl" -E \ + -e "s,( url *=).*$,\1 \"$base$file\"," \ + -e "s,( checksum *=).*$,\1 \"$sha\"," diff --git a/distros/debian/13/update.sh b/distros/debian/13/update.sh new file mode 100755 index 0000000..43934d7 --- /dev/null +++ b/distros/debian/13/update.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +root="$(cd "$(dirname "$0")"; pwd)" +hcl="$root/amd64.pkrvars.hcl" + +base="https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/" + +sums="$(curl -L "$base/SHA256SUMS" | grep -v -e "-edu-" -e "-mac-")" + +sha="$(echo "$sums" | awk '{print $1}')" +file="$(echo "$sums" | awk '{print $2}')" + +echo "Found $file with sum $sha" + +sed -i "$hcl" -E \ + -e "s,( url *=).*$,\1 \"$base$file\"," \ + -e "s,( checksum *=).*$,\1 \"$sha\","