Elliott Hughes | 5dec78d | 2014-02-26 15:56:23 -0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | export HDBMEGS=128 |
| 4 | |
| 5 | build_in_dir() |
| 6 | { |
| 7 | cd "$1" || exit 1 |
| 8 | rm -f hdb.img 2>/dev/null |
| 9 | nice -n10 ./native-build.sh ../hdc.img |
| 10 | rm -f hdb.img 2>/dev/null |
| 11 | } |
| 12 | |
| 13 | started=false |
| 14 | for dir; do |
| 15 | test -d "$dir" || continue |
| 16 | test -e "$dir/native-build.sh" || continue |
| 17 | echo "Starting: $dir" |
| 18 | build_in_dir "$dir" </dev/null >"$dir.log" 2>&1 & |
| 19 | started=true |
| 20 | done |
| 21 | |
| 22 | $started || { |
| 23 | echo "Give me system-image-ARCH directories on command line" |
| 24 | exit 1 |
| 25 | } |
| 26 | |
| 27 | echo "Waiting to finish" |
| 28 | wait |
| 29 | echo "Done, check the logs" |