33 lines
638 B
Bash
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}"
|