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/image-build/cross.sh

33 lines
638 B
Bash

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