1#!/usr/bin/env bash
2
3DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4
5# build everything in the projects directory
6PROJECTS=$(echo project/*.mk | xargs -n1 basename | sed 's/\.mk//')
7FAILED=""
8
9for p in $PROJECTS; do
10    PROJECT=$p nice $DIR/make-parallel || FAILED="$FAILED $p"
11done
12
13if [ "$FAILED" != "" ]; then
14    echo
15    echo some projects have failed to build:
16    echo $FAILED
17fi
18