summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_arch_schroot_setup.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-17 13:37:51 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-17 13:37:51 +0200
commit9e0734ea6051292bbdd7ce1866e97ac6f3eb8c19 (patch)
treec433dd677c40a99f42e8a7b9be0e42301d0fbf1c /bin/reproducible_arch_schroot_setup.sh
parente4457148ff14e5838a50573a88002afbf9b349f7 (diff)
downloadjenkins.debian.net-9e0734ea6051292bbdd7ce1866e97ac6f3eb8c19.tar.xz
reproducible arch: automatically use the latest bootstrap.tgz
Diffstat (limited to 'bin/reproducible_arch_schroot_setup.sh')
-rwxr-xr-xbin/reproducible_arch_schroot_setup.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/reproducible_arch_schroot_setup.sh b/bin/reproducible_arch_schroot_setup.sh
index d0d9e92a..d9a78e3e 100755
--- a/bin/reproducible_arch_schroot_setup.sh
+++ b/bin/reproducible_arch_schroot_setup.sh
@@ -12,13 +12,19 @@ DEBUG=true
. /srv/jenkins/bin/common-functions.sh
common_init "$@"
-# define URL for bootstrap.tgz
-BOOTSTRAP_BASE=http://mirror.one.com/archlinux/iso/
-BOOTSTRAP_DATE=2015.10.01
-BOOTSTRAP_TAR_GZ=$BOOTSTRAP_DATE/archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz
bootstrap() {
+ # define URL for bootstrap.tgz
+ BOOTSTRAP_BASE=http://mirror.one.com/archlinux/iso/
+ echo "$(date -u) - downloading Archlinux latest/sha1sums.txt"
+ BOOTSTRAP_DATE=$(curl $BOOTSTRAP_BASE/latest/sha1sums.txt 2>/dev/null| grep x86_64.tar.gz| cut -d " " -f3|cut -d "-" -f3|egrep '[0-9.]{9}')
+ if [ -z $BOOTSTRAP_DATE ] ; then
+ echo "Cannot determine version of boostrap file, aborting."
+ curl $BOOTSTRAP_BASE/latest/sha1sums.txt | grep x86_64.tar.gz
+ exit 1
+ fi
+ BOOTSTRAP_TAR_GZ=$BOOTSTRAP_DATE/archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz
echo "$(date -u) - downloading Archlinux bootstrap.tar.gz."
curl -O $BOOTSTRAP_BASE/$BOOTSTRAP_TAR_GZ
tar xzf archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz