1 |
1551
|
aaronmk
|
#!/bin/bash
|
2 |
1541
|
aaronmk
|
# Imports all inputs at once
|
3 |
|
|
|
4 |
1952
|
aaronmk
|
import_all_main ()
|
5 |
|
|
{
|
6 |
|
|
local self="${BASH_SOURCE[0]}"
|
7 |
|
|
local selfDir="$(dirname -- "$self")"
|
8 |
|
|
|
9 |
1953
|
aaronmk
|
if test "${BASH_LINENO[1]}" = 0; then # was run without initial "."
|
10 |
5039
|
aaronmk
|
echo "Usage: . $self [vars...] (note initial \".\")"|fold -s >&2
|
11 |
1952
|
aaronmk
|
return 2
|
12 |
|
|
fi
|
13 |
|
|
|
14 |
5917
|
aaronmk
|
make inputs/.TNRS/tnrs_accepted/reinstall
|
15 |
|
|
make inputs/.TNRS/tnrs_other/reinstall
|
16 |
5503
|
aaronmk
|
|
17 |
5957
|
aaronmk
|
make inputs/.geoscrub/import "$@" &
|
18 |
5959
|
aaronmk
|
sleep 5 # wait for make commands to scroll by
|
19 |
|
|
|
20 |
5836
|
aaronmk
|
make inputs/.NCBI/import by_col=1 "$@"
|
21 |
5943
|
aaronmk
|
# Must come after NCBI for cross links to be made
|
22 |
5957
|
aaronmk
|
make inputs/.TNRS/import "$@"
|
23 |
5959
|
aaronmk
|
|
24 |
6208
|
aaronmk
|
wait %1 # wait for asynchronous commands (geoscrub import)
|
25 |
5503
|
aaronmk
|
|
26 |
5836
|
aaronmk
|
make inputs/.TNRS/tnrs/tnrs-remake wait=1 "$@" &
|
27 |
5039
|
aaronmk
|
. "$selfDir/with_all" import "$@"
|
28 |
1952
|
aaronmk
|
}
|
29 |
|
|
import_all_main "$@"
|