Download stage3 only if it does not exist.
This commit is contained in:
parent
e7c376768b
commit
3bf0db5d9a
@ -7,17 +7,26 @@ die() {
|
||||
|
||||
set -e
|
||||
|
||||
# Get latest stage3 tag
|
||||
STAGE3_TAG=$(wget -q -O - \
|
||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64.txt \
|
||||
| grep -v "^#" | cut -d ' ' -f 1)
|
||||
if [ ! -r /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz ]
|
||||
then
|
||||
# Get latest stage3 tag
|
||||
STAGE3_TAG=$(wget -q -O - \
|
||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64.txt \
|
||||
| grep -v "^#" | cut -d ' ' -f 1)
|
||||
|
||||
# Download latest stable stage3 build
|
||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}
|
||||
# Download latest stable stage3 build
|
||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG} \
|
||||
-O /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz
|
||||
|
||||
ln -sf /var/lib/catalyst/store/builds/$(basename ${STAGE3_TAG}) \
|
||||
/var/lib/catalyst/store/builds/stage3-amd64-latest.tar.xz
|
||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.CONTENTS \
|
||||
-O /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz.CONTENTS
|
||||
|
||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.DIGESTS \
|
||||
-O /var/lib/catalyst/store/builds/default/stage3-amd64-latest.tar.xz.DIGESTS
|
||||
fi
|
||||
|
||||
# Download latest portage snapshot
|
||||
wget -q -N -P /var/lib/catalyst/store/snapshots/ \
|
||||
|
Loading…
Reference in New Issue
Block a user