Revision 9555
Added by Aaron Marcuse-Kubitza over 11 years ago
table.run | ||
---|---|---|
15 | 15 |
fi #### |
16 | 16 |
|
17 | 17 |
. "$(dirname "${BASH_SOURCE[0]}")"/import.run |
18 |
. "$(dirname "${BASH_SOURCE[0]}")"/../sh/local.sh |
|
19 |
. "$(dirname "${BASH_SOURCE[0]}")"/../sh/make.sh |
|
18 |
. "$(dirname "${BASH_SOURCE[0]}")"/table_dir.run |
|
20 | 19 |
|
21 | 20 |
if self_not_included; then |
22 | 21 |
|
23 |
: "${schema="$(log+ 2 cd "$top_dir"/..; basename "$PWD")"}" |
|
24 |
: "${table="$( log+ 2 cd "$top_dir" ; basename "$PWD")"}" |
|
25 |
export schema table |
|
26 |
|
|
27 |
table_make() # usage: [silent=1] table_make target... |
|
28 |
# requires Makefile in datasrc dir with `include ../input.Makefile` |
|
29 |
# target names are relative to the table subdir itself, not the datasrc dir |
|
30 |
{ |
|
31 |
echo_func; kw_params silent |
|
32 |
make --directory="$(canon_rel_path "$top_dir"/..)" ${silent:+--silent }\ |
|
33 |
"${@/#/$table/}" |
|
34 |
# "${@/#/$table/}": replaces empty str at beginning of str (/#) with $table/ |
|
35 |
} |
|
36 |
|
|
37 | 22 |
map_table() |
38 | 23 |
{ |
39 | 24 |
echo_func |
Also available in: Unified diff
added lib/runscripts/table_dir.run and use it in table.run