grab.sh: Adjust sed expression to also remove sizes from latest lines
authorW. Trevor King <wking@tremily.us>
Thu, 9 Apr 2015 02:45:51 +0000 (19:45 -0700)
committerW. Trevor King <wking@tremily.us>
Thu, 9 Apr 2015 02:45:51 +0000 (19:45 -0700)
Recently the latest file gained a second byte-size column, with
entries like:

  20150402/stage3-amd64-20150402.tar.bz2 215954519

This commit relaxes the sed expression to match these new lines too.

grab.sh

diff --git a/grab.sh b/grab.sh
index 2fa636cb257566248d8b37f16b57e33b796f4d30..9a5cafd8aabe5c1bf29ce6b5a325be2bcaddb7f4 100755 (executable)
--- a/grab.sh
+++ b/grab.sh
@@ -27,7 +27,7 @@
 MIRROR="${MIRROR:-http://distfiles.gentoo.org/}"
 BASE_ARCH_URL="${BASE_ARCH_URL:-${MIRROR}releases/amd64/autobuilds/}"
 LATEST=$(wget -O - "${BASE_ARCH_URL}latest-stage3.txt")
-DATE=$(echo "${LATEST}" | sed -n 's|/stage3-amd64-[0-9]*[.]tar[.]bz2||p')
+DATE=$(echo "${LATEST}" | sed -n 's|/stage3-amd64-[0-9]*[.]tar[.]bz2.*||p')
 ARCH_URL="${ARCH_URL:-${BASE_ARCH_URL}${DATE}/}"
 STAGE3="${STAGE3:-stage3-amd64-${DATE}.tar.bz2}"
 STAGE3_CONTENTS="${STAGE3_CONTENTS:-${STAGE3}.CONTENTS}"