37 lines
716 B
Bash
37 lines
716 B
Bash
#!/bin/sh
|
|
|
|
SELF=$(readlink -f "$0")
|
|
SRCDIR=${SELF%/*}
|
|
. "${SRCDIR}"/common.sh
|
|
|
|
target=aarch64-unknown-linux-gnu
|
|
stage3=amd64-nomultilib-openrc
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
-t|--target)
|
|
shift
|
|
target="$1"
|
|
;;
|
|
-b|--base)
|
|
shift
|
|
stage3="$1"
|
|
;;
|
|
*)
|
|
printf 'Unknown argument: %s\n' "$1" >&2
|
|
exit 2
|
|
;;
|
|
esac
|
|
done
|
|
|
|
set -e
|
|
|
|
cid=$(buildah from "aimee-os.org/gentoo/stage3-${stage3}")
|
|
buildah_run_script ${cid} sync.sh
|
|
buildah_run_script ${cid} crossdev.sh "${target}"
|
|
buildah config \
|
|
--add-history \
|
|
--cmd /bin/bash \
|
|
--label target=${target} \
|
|
${cid}
|
|
buildah commit --rm ${cid} aimee-os.org/build/cross-${target}
|