Revision 1550
Added by Aaron Marcuse-Kubitza almost 13 years ago
bin/import-all | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
# Imports all inputs at once |
|
3 |
# Usage: . self (note initial ".") |
|
4 |
|
|
5 |
self="$(readlink -f -- "$BASH_SOURCE")" |
|
6 |
selfDir="$(dirname -- "$self")" |
|
7 |
|
|
8 |
for input in inputs/*/; do |
|
9 |
eval "make ${input}import &" |
|
10 |
disown -h "$(jobs|tail -1|"$selfDir/jobspecs")" # ignore SIGHUP |
|
11 |
sleep 2 # wait for initial output so that outputs don't become jumbled |
|
12 |
done |
|
13 | 0 |
bin/import_all | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
# Imports all inputs at once |
|
3 |
# Usage: . self (note initial ".") |
|
4 |
|
|
5 |
self="$(readlink -f -- "$BASH_SOURCE")" |
|
6 |
selfDir="$(dirname -- "$self")" |
|
7 |
|
|
8 |
for input in inputs/*/; do |
|
9 |
eval "make ${input}import &" |
|
10 |
disown -h "$(jobs|tail -1|"$selfDir/jobspecs")" # ignore SIGHUP |
|
11 |
sleep 2 # wait for initial output so that outputs don't become jumbled |
|
12 |
done |
|
0 | 13 |
README.TXT | ||
---|---|---|
4 | 4 |
Warning: This will delete your VegBIEN DB! |
5 | 5 |
|
6 | 6 |
Data import: |
7 |
Import data into VegBIEN: . bin/import-all
|
|
7 |
Import data into VegBIEN: . bin/import_all
|
|
8 | 8 |
Empty the DB: make empty_db |
9 |
Re-import data: make empty_db; . bin/import-all
|
|
9 |
Re-import data: make empty_db; . bin/import_all
|
|
10 | 10 |
|
11 | 11 |
Schema changes: |
12 | 12 |
Regenerate schema from installed DB: make schemas/remake |
Makefile | ||
---|---|---|
216 | 216 |
|
217 | 217 |
import: _always import-msg inputs/import ; |
218 | 218 |
import-msg: _always |
219 |
@echo $(emph)"To import all inputs at once:"$(endEmph) . bin/import-all
|
|
219 |
@echo $(emph)"To import all inputs at once:"$(endEmph) . bin/import_all
|
|
220 | 220 |
@echo |
221 | 221 |
@$(wait) |
222 | 222 |
|
Also available in: Unified diff
Renamed import-all to import_all to match convention of using underscores