This repository has been archived on 2025-09-06. You can view files and clone it, but cannot push or open issues/pull-requests.
container-images/gentoo-stage3.sh

23 lines
509 B
Bash

#!/bin/sh
SELF=$(readlink -f "$0")
SRCDIR=${SELF%/*}
tarball=$1
set -e
if [ -z "${tarball}" ]; then
tarball=$(sh "${SRCDIR}"/fetch-stage3.sh "$@")
fi
stage3=${tarball%.tar.*}
version=${stage3##*-}
stage3=${stage3%-*}
cid=$(buildah from scratch)
buildah add "${cid}" "${tarball}"
buildah config --cmd /bin/bash "${cid}"
buildah commit --rm --squash "${cid}" "aimee-os.org/gentoo/${stage3}:${version}"
buildah tag "aimee-os.org/gentoo/${stage3}:${version}" \
"aimee-os.org/gentoo/${stage3}:latest"