commit changes

This commit is contained in:
ag-tsotetsi
2026-03-25 14:54:35 +02:00
parent 409517b49f
commit d7cd49e447
22 changed files with 425 additions and 462 deletions

46
build.sh Normal file → Executable file
View File

@@ -1,6 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ -v DEBUG ]]; then
set -euox pipefail
else
set -euo pipefail
fi
umask 022
@@ -8,8 +12,42 @@ umask 022
. flags.bash
. utilities.bash
create_sysroot
STAGE="$1"
PACKAGE="$2"
bootstrap_builds() {
for build in binutils gcc linux glibc libstc++; do
. "stage/bootstrap/${build}.bash"
cd "$PROJDIR"
done
}
. "stage/${MODE}/${PACKAGE}.bash"
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