Project

General

Profile

« Previous | Next » 

Revision 9820

added lib/runscripts/mysql.table.run (general to all MySQL datasources) and use it in inputs/GBIF/table.run

View differences:

inputs/GBIF/table.run
1 1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/table.run
3

  
4
if self_not_included; then
5

  
6
table.tsv.md5/make()
7
{
8
	echo_func; set_make_vars; check_target_exists
9
	table_make "$target_filename"
10
}
11

  
12
table.tsv.gz/upload()
13
{
14
	echo_func; set_make_vars
15
	live=1 sync_upload "$target"
16
}
17

  
18
table.tsv.gz/make()
19
{
20
	echo_func; set_make_vars
21
	table_make "$target_filename"
22
	if test ! "$test"; then table.tsv.gz/upload; fi
23
}
24

  
25
table.tsv/make() # usage: [remake=1] [limit=...] .../run table.tsv/make
26
{
27
	echo_func; set_make_vars; check_target_exists
28
	(set_large_table; to_target mysql_export_local) || return
29
	remake=1 bg_cmd "$target_filename".gz/make; sleep 6 # wait for log msgs
30
	remake=1 "$target_filename".md5/make
31
}
32

  
33
export_mysql()
34
{
35
	echo_func
36
	table.tsv/make
37
}
38

  
39
func_override import__table_run
40
import()
41
{
42
	echo_func
43
	export_mysql
44
	self_make import__table_run "$@"
45
}
46

  
47
fi
2
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/mysql.table.run
lib/runscripts/mysql.table.run
1
#!/bin/bash -e
2

  
3
if false; then #### run script template:
4
#!/bin/bash -e
5
. "$(dirname "${BASH_SOURCE[0]}")"/path/to/mysql.table.run
6
fi ####
7

  
8
. "$(dirname "${BASH_SOURCE[0]}")"/table.run
9

  
10
if self_not_included; then
11

  
12
table.tsv.md5/make()
13
{
14
	echo_func; set_make_vars; check_target_exists
15
	table_make "$target_filename"
16
}
17

  
18
table.tsv.gz/upload()
19
{
20
	echo_func; set_make_vars
21
	live=1 sync_upload "$target"
22
}
23

  
24
table.tsv.gz/make()
25
{
26
	echo_func; set_make_vars
27
	table_make "$target_filename"
28
	if test ! "$test"; then table.tsv.gz/upload; fi
29
}
30

  
31
table.tsv/make() # usage: [remake=1] [limit=...] .../run table.tsv/make
32
{
33
	echo_func; set_make_vars; check_target_exists
34
	(set_large_table; to_target mysql_export_local) || return
35
	remake=1 bg_cmd "$target_filename".gz/make; sleep 6 # wait for log msgs
36
	remake=1 "$target_filename".md5/make
37
}
38

  
39
export_mysql()
40
{
41
	echo_func
42
	table.tsv/make
43
}
44

  
45
func_override import__table_run
46
import()
47
{
48
	echo_func
49
	export_mysql
50
	self_make import__table_run "$@"
51
}
52

  
53
fi
0 54

  

Also available in: Unified diff