gentoo-builder/entrypoint.sh

28 lines
804 B
Bash
Executable File

#!/bin/sh
die() {
echo $* >&2
exit 1
}
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)
# Download latest stable stage3 build
wget -N -O /var/lib/catalyst/store/builds/stage3-amd64-latest.tar.xz \
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}
# Download latest portage snapshot
wget -N -O /var/lib/catalyst/store/snapshots/portage-latest.tar.bz2 \
https://gentoo.osuosl.org/releases/snapshots/current/portage-latest.tar.bz2
# Update stage3 snapshot
catalyst -c /var/lib/catalyst/catalyst.conf -f /var/lib/catalyst/stage3.spec
# Update custom packages
catalyst -c /var/lib/catalyst/catalyst.conf -f /var/lib/catalyst/build.spec