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