Files
axe-os/build.sh
2026-03-25 14:54:35 +02:00

54 lines
770 B
Bash
Executable File

#!/usr/bin/env bash
if [[ -v DEBUG ]]; then
set -euox pipefail
else
set -euo pipefail
fi
umask 022
. version.bash
. flags.bash
. utilities.bash
create_sysroot
bootstrap_builds() {
for build in binutils gcc linux glibc libstc++; do
. "stage/bootstrap/${build}.bash"
cd "$PROJDIR"
done
}
toolchain_builds() {
for build in m4 ncurses bash coreutils diffutils file findutils gawk grep gzip make patch sed tar xz binutils gcc; do
. "stage/toolchain/${build}.bash"
cd "$PROJDIR"
done
}
usage() {
echo "usage: build.bash <stage> <package>"
exit 1
}
if [ $# -eq 1 ]; then
case $1 in
bootstrap)
bootstrap_builds
;;
toolchain)
toolchain_builds
;;
*)
usage
;;
esac
elif [ $# -eq 2 ]; then
. "stage/$1/$2.bash"
else
usage
fi