File: random_bowtie_tests_p.sh

package info (click to toggle)
bowtie 1.2.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,704 kB
  • sloc: cpp: 35,614; perl: 5,903; ansic: 1,247; sh: 1,128; python: 483; makefile: 426
file content (29 lines) | stat: -rwxr-xr-x 622 bytes parent folder | download | duplicates (4)
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

# Spawn a bunch of parallel processes running random_bowtie_tests.sh
# and dumping results into text files.  Run from the bowtie dir.
PREFIX=${0%/*}

NUM=$1
if [ -z "$NUM" ] ; then
	NUM=4
fi

make allall
if [ "$?" != "0" ] ; then
	echo "Error during build"
	exit 1
fi

echo > .randpids
while [ $NUM -gt 0 ] ; do
	echo "Spawning: sh scripts/random_bowtie_tests.sh $NUM > .randstdout.$NUM 2> .randstderr.$NUM &"
	sh $PREFIX/random_bowtie_tests.sh $NUM > .randstdout.$NUM 2> .randstderr.$NUM &
	echo $! >> .randpids
	NUM=`expr $NUM - 1`
done

for p in `cat .randpids` ; do
	echo "Waiting for pid $p"
	wait $p
done