Variabilize path.

This commit is contained in:
Alexis Lahouze 2019-03-20 15:26:48 +01:00
parent e2103d0ee4
commit fb7ba77ca4

View File

@ -7,7 +7,9 @@ die() {
set -e set -e
if [ ! -r /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz ] BUILDDIR=/var/lib/catalyst/store/builds/default
if [ ! -r ${BUILDDIR}/stage3-amd64-latest.tar.xz ]
then then
# Get latest stage3 tag # Get latest stage3 tag
STAGE3_TAG=$(wget -q -O - \ STAGE3_TAG=$(wget -q -O - \
@ -17,15 +19,15 @@ then
# Download latest stable stage3 build # Download latest stable stage3 build
wget -q -N -P /var/lib/catalyst/store/builds/ \ wget -q -N -P /var/lib/catalyst/store/builds/ \
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG} \ http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG} \
-O /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz -O ${BUILDDIR}/stage3-amd64-latest.tar.xz
wget -q -N -P /var/lib/catalyst/store/builds/ \ wget -q -N -P /var/lib/catalyst/store/builds/ \
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.CONTENTS \ http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.CONTENTS \
-O /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz.CONTENTS -O ${BUILDDIR}/stage3-amd64-latest.tar.xz.CONTENTS
wget -q -N -P /var/lib/catalyst/store/builds/ \ wget -q -N -P /var/lib/catalyst/store/builds/ \
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.DIGESTS \ http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.DIGESTS \
-O /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz.DIGESTS -O ${BUILDDIR}/stage3-amd64-latest.tar.xz.DIGESTS
fi fi
# Download latest portage snapshot # Download latest portage snapshot