PlainOsBuilder/build.sh

30 lines
459 B
Bash
Raw Normal View History

2023-12-20 18:18:01 +00:00
#!/bin/sh
CC=cc
RTFS=$(pwd)/rootfs
mu_repo="https://git.macaw.me/8nl/micro-utils"
ml_repo="git://git.musl-libc.org/musl"
cc_repo="git://repo.or.cz/tinycc.git"
#Tests
for i in tests/*; do
if ! env CC=$CC $i; then
echo "Build failed"
exit 1
fi
done
#Clean
./clean.sh
#Make rootfs
mkdir rootfs
#Build system
for i in stages/*; do
if ! env mu_repo=$mu_repo ml_repo=$ml_repo cc_repo=$cc_repo RTFS=$RTFS $i; then
echo "Build failed"
exit 1
fi
done