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