From 2525b3dc1c1aae6b0ee854d899d9ffc285983c12 Mon Sep 17 00:00:00 2001 From: Albert S Date: Fri, 24 Jun 2022 22:51:36 +0200 Subject: [PATCH] scripts: 1-create.sh: Download latest gentoo stage3 --- scripts/1-create.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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