Project

General

Profile

1 8291 aaronmk
#!/bin/bash -e
2 8774 aaronmk
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/table.run
3 8286 aaronmk
4 8705 aaronmk
if self_not_included; then
5
6 9391 aaronmk
table.tsv.md5/make()
7
{
8
	echo_func; set_make_vars; check_target_exists
9 9746 aaronmk
	table_make "$target_filename"
10 9391 aaronmk
}
11
12 9748 aaronmk
table.tsv.gz/make()
13
{
14
	echo_func; set_make_vars
15
	table_make "$target_filename"
16
}
17
18 9802 aaronmk
table.tsv*/upload()
19
{
20
	echo_func; set_make_vars
21 9807 aaronmk
	live=1 inplace=1 sync_upload "$target"
22 9802 aaronmk
}
23
24 9348 aaronmk
table.tsv/make() # usage: [remake=1] [limit=...] .../run table.tsv/make
25 8286 aaronmk
{
26 8990 aaronmk
	echo_func; set_make_vars; check_target_exists
27 9699 aaronmk
	(set_large_table; to_target mysql_export_local) || return
28 9749 aaronmk
	remake=1 bg_cmd "$target_filename".gz/make; sleep 6 # wait for log msgs
29 9675 aaronmk
	remake=1 "$target_filename".md5/make
30 9803 aaronmk
	table.tsv*/upload
31 8286 aaronmk
}
32
33 9074 aaronmk
export_mysql()
34 8961 aaronmk
{
35
	echo_func
36
	table.tsv/make
37
}
38
39 9039 aaronmk
func_override import__table_run
40 9074 aaronmk
import()
41 8286 aaronmk
{
42 8881 aaronmk
	echo_func
43 8950 aaronmk
	export_mysql
44 9681 aaronmk
	self_make import__table_run "$@"
45 8286 aaronmk
}
46 8705 aaronmk
47
fi