From 570a17053c7f52313e02196cf6dce10c6bb0c5cb Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 11 Nov 2014 17:19:55 -0600 Subject: Applying slightly modified patch from Rui Miguel P. Bernardo to provide support of --snapshot option for utilizing snapshot.debian.org. --- functions/debian-snapshot.sh | 138 +++++++++++++++++++++++++++++++++++++++++++ functions/defaults.sh | 24 ++++++++ 2 files changed, 162 insertions(+) create mode 100755 functions/debian-snapshot.sh (limited to 'functions') diff --git a/functions/debian-snapshot.sh b/functions/debian-snapshot.sh new file mode 100755 index 000000000..7bdf5e2f5 --- /dev/null +++ b/functions/debian-snapshot.sh @@ -0,0 +1,138 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2012 Daniel Baumann +## +## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + +Short_date () +{ + SHORT_DATE="${1}:-${LB_SNAPSHOT}}" + # returns the date as YYYYMMDD + echo "${SHORT_DATE}" | cut -c 1-8 +} + +Last_archive_entry () +{ + # returns the last date link + LAST_ENTRY="$(cat /tmp/index.html | grep "$(date +%Y%m)" | sed 's|.*