forked from hsd1503/ENCASE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-entry.sh
34 lines (29 loc) · 890 Bytes
/
prepare-entry.sh
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
30
31
32
33
34
#!/bin/bash
#
# file: prepare-entry.sh
#
# This script shows how to run the example code (setup.sh and next.sh)
# over the validation set, in order to produce the list of expected
# answers (answers.txt) which must be submitted as part of your entry.
# This script itself does not need to be included in your entry.
set -e
set -o pipefail
echo "==== running setup script ===="
./setup.sh
echo "==== running entry script on validation set ===="
rm -f answers.txt
# use GNU parallel if available
if parallel -k </dev/null >/dev/null 2>/dev/null; then
parallel -k --halt=1 < validation/RECORDS \
echo {} \; \
ln -sf validation/{}.hea . \; \
ln -sf validation/{}.mat . \; \
./next.sh {}
else
for r in `cat validation/RECORDS`; do
echo $r
ln -sf validation/$r.hea .
ln -sf validation/$r.mat .
./next.sh $r
done
fi