diff --git a/scripts/1-create.sh b/scripts/1-create.sh index 8467c75..e42ad55 100755 --- a/scripts/1-create.sh +++ b/scripts/1-create.sh @@ -1,9 +1,9 @@ #!/bin/bash - set -e -# TODO: always download latest -wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/current-stage3-amd64-hardened-openrc/stage3-amd64-hardened-openrc-20220619T170540Z.tar.xz -O hardened.tar.xz -wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/current-stage3-amd64-hardened-openrc/stage3-amd64-hardened-openrc-20220619T170540Z.tar.xz.asc -O hardened.tar.xz.asc + +LATEST=$( curl -L "https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/latest-stage3-amd64-hardened-openrc.txt" | tail -n 1 | awk '{print $1}' ) +wget "https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/$LATEST" -O hardened.tar.xz +wget "https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/$LATEST.asc" -O hardened.tar.xz.asc gpg --verify hardened.tar.xz.asc hardened.tar.xz