Project

General

Profile

1 5080 aaronmk
#!/bin/bash
2
# Runs tnrs_db on VegBIEN
3 7078 aaronmk
# Usage: make inputs/.TNRS/tnrs/tnrs-remake [log=] [wait=1]
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 5122 aaronmk
set -x
21 6052 aaronmk
date
22
23 5096 aaronmk
exec tnrs_db "$@"