From ed7872f8783928c0c934b69be2dc600d47ce2691 Mon Sep 17 00:00:00 2001 From: Appu Date: Mon, 11 May 2026 13:57:34 -0400 Subject: [PATCH] fix debian-security timestamp selection debian urls were forgiving enough that this worked, this just fixes that and selects debian-security timestamps more accurately Signed-off-by: Appu --- knife | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knife b/knife index 3bdbb21ff..26ba4a692 100755 --- a/knife +++ b/knife @@ -69,7 +69,7 @@ function find_latest_snapshot() { local current="$(date -d '-1 day' +%Y-%m-%d)" local tmp=$(mktemp) local q=$(date -d "$current" +"year=%Y&month=%m") - if curl -fs "https://snapshot.debian.org/archive/debian/?$q" | grep -ohE "([0-9]+T[0-9]+Z)" > $tmp; then + if curl -fs "https://snapshot.debian.org/archive/${type}/?$q" | grep -ohE "([0-9]+T[0-9]+Z)" > $tmp; then # same logic as above, find the newest snapshot that isn't "today" today=$(date +"%Y%m%dT") cat $tmp | grep -v $today | tail -n1