23 lines
509 B
Bash
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"
|