38 lines
723 B
Bash
38 lines
723 B
Bash
#!/bin/sh
|
|
|
|
SELF=$(readlink -f "$0")
|
|
SRCDIR=${SELF%/*}
|
|
. "${SRCDIR}"/lib/common.sh
|
|
|
|
target=aarch64-unknown-linux-gnu
|
|
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
|
|
|
|
if [ -z "${base-}" ]; then
|
|
base=aimee-os.org/build/cross-"${target}"
|
|
fi
|
|
|
|
set -e
|
|
|
|
cid=$(buildah from "${base}")
|
|
buildah add "${cid}" portage /etc/portage
|
|
buildah_run_script "${cid}" "${SRCDIR}"/lib/sync.sh
|
|
buildah_run_script "${cid}" "${SRCDIR}"/tools.sh
|
|
df -Th
|
|
buildah commit --rm --squash "${cid}" "aimee-os.org/build/build-${target}"
|