1 |
1551
|
aaronmk
|
#!/bin/bash
|
2 |
1541
|
aaronmk
|
# Imports all inputs at once
|
3 |
|
|
|
4 |
1551
|
aaronmk
|
self="${BASH_ARGV[0]}"
|
5 |
1546
|
aaronmk
|
selfDir="$(dirname -- "$self")"
|
6 |
|
|
|
7 |
1551
|
aaronmk
|
if test "${BASH_LINENO[0]}" = 0; then # was run without initial "."
|
8 |
|
|
echo "Usage: . $0 (note initial \".\")"|fold -s >&2
|
9 |
|
|
exit 2
|
10 |
|
|
fi
|
11 |
|
|
|
12 |
1541
|
aaronmk
|
for input in inputs/*/; do
|
13 |
1547
|
aaronmk
|
eval "make ${input}import &"
|
14 |
1546
|
aaronmk
|
disown -h "$(jobs|tail -1|"$selfDir/jobspecs")" # ignore SIGHUP
|
15 |
1541
|
aaronmk
|
sleep 2 # wait for initial output so that outputs don't become jumbled
|
16 |
|
|
done
|