#!/bin/sh if [ $(id -u) -ne 0 ]; then echo "Run script without root" > &2 exit 1 fi #Add repos in 0-download-src.sh CC=cc RTFS=$(pwd)/rootfs #Tests for i in tests/*; do if ! env CC=$CC $i; then echo "Build failed" >&2 exit 1 fi done #Clean ./clean.sh #Make rootfs mkdir rootfs #Build system for i in stages/*; do if ! env RTFS=$RTFS $i; then echo "Build failed" >&2 exit 1 fi done