1 |
5080
|
aaronmk
|
#!/bin/bash
|
2 |
|
|
# Runs tnrs_db on VegBIEN
|
3 |
9518
|
aaronmk
|
# Usage: make inputs/.TNRS/tnrs/tnrs-remake [log=]
|
4 |
5080
|
aaronmk
|
|
5 |
7255
|
aaronmk
|
# Handle being run as a .make script
|
6 |
|
|
exec >&2
|
7 |
|
|
unset MAKEFLAGS MFLAGS
|
8 |
|
|
|
9 |
6067
|
aaronmk
|
selfDir="$(dirname -- "$0")"
|
10 |
6066
|
aaronmk
|
selfName="$(basename $0)"
|
11 |
|
|
|
12 |
7263
|
aaronmk
|
waitself "$0"
|
13 |
|
|
|
14 |
7064
|
aaronmk
|
. vegbien_dest
|
15 |
5080
|
aaronmk
|
|
16 |
5096
|
aaronmk
|
if test -n "${log=1}"; then # $log defaults to 1
|
17 |
6067
|
aaronmk
|
exec >>"$selfDir/logs/$selfName.log.sql" 2>&1
|
18 |
5096
|
aaronmk
|
fi
|
19 |
6052
|
aaronmk
|
|
20 |
9901
|
aaronmk
|
echo -n 'start time: '; date
|
21 |
9902
|
aaronmk
|
(set -x; time tnrs_db "$@")
|