Revision 6897
Added by Aaron Marcuse-Kubitza about 12 years ago
bin/import_all | ||
---|---|---|
16 | 16 |
make inputs/.TNRS/tnrs_other/reinstall |
17 | 17 |
|
18 | 18 |
all=1; . "$selfDir/with_all" Source/import by_col=1 "$@" |
19 |
# note that this isn't affected by $import_source |
|
19 | 20 |
wait # wait for asynchronous commands |
20 | 21 |
unset all |
21 | 22 |
|
23 |
export import_source= # Source tables have already been imported |
|
24 |
|
|
22 | 25 |
make inputs/.herbaria/import "$@" & |
23 | 26 |
sleep 5 # wait for make commands to scroll by |
24 | 27 |
|
... | ... | |
32 | 35 |
wait # wait for asynchronous commands |
33 | 36 |
|
34 | 37 |
make inputs/.TNRS/tnrs/tnrs-remake wait=1 "$@" & |
35 |
. "$selfDir/with_all" import import_source= "$@"
|
|
38 |
. "$selfDir/with_all" import "$@" |
|
36 | 39 |
|
37 | 40 |
after_import () |
38 | 41 |
{ |
... | ... | |
41 | 44 |
|
42 | 45 |
jobs="$(jobs -p)" |
43 | 46 |
(bin/waitpid $jobs; after_import) & |
47 |
|
|
48 |
unset import_source |
|
44 | 49 |
} |
45 | 50 |
import_all_main "$@" |
Also available in: Unified diff
import_all: Run all imports (not just the main datasources' import) with $import_source turned off, so that the Source tables will not be imported a second time when the datasource's main tables are imported. Note that it's not necessary to wait for asynchronous commands after the jobs for the main import are started (so that $import_source is not unset until after they are started), because with_all does not return until all jobs are started and have noted the $import_source setting in effect in the shell environment.