summaryrefslogtreecommitdiff
path: root/qemu_multiarch_testing/parallel-build-hdc-img.sh
blob: cbfe42fbb311d8a8e3a11c2a7373cc178303d483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

export HDBMEGS=128

build_in_dir()
{
	cd "$1" || exit 1
	rm -f hdb.img 2>/dev/null
	nice -n10 ./native-build.sh ../hdc.img
	rm -f hdb.img 2>/dev/null
}

started=false
for dir; do
	test -d "$dir" || continue
	test -e "$dir/native-build.sh" || continue
	echo "Starting: $dir"
	build_in_dir "$dir" </dev/null >"$dir.log" 2>&1 &
	started=true
done

$started || {
	echo "Give me system-image-ARCH directories on command line"
	exit 1
}

echo "Waiting to finish"
wait
echo "Done, check the logs"