Project

General

Profile

« Previous | Next » 

Revision 9039

bugfix: : use new func_override for runscript inheritance instead of invoking the overridden function as a (command-line) target of the parent runscript. this ensures that the overridden function is run in the *same process as the calling function, so that $top_dir keeps the same value and runscript-relative paths continue to work.

View differences:

inputs/GBIF/table.run
16 16
	table.tsv/make
17 17
}
18 18

  
19
func_override import__table_run
19 20
import ()
20 21
{
21 22
	echo_func
22 23
	export_mysql
23
	"$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/table.run "$FUNCNAME" "$@"
24
	import__table_run "$@"
24 25
}
25 26

  
26 27
fi
inputs/GBIF/raw_occurrence_record/run
3 3

  
4 4
if self_not_included; then
5 5

  
6
func_override export_mysql__table_run
6 7
export_mysql ()
7 8
{
8 9
	echo_func
9
	"$(dirname "${BASH_SOURCE[0]}")"/../table.run "$FUNCNAME" "$@"
10
	export_mysql__table_run "$@"
10 11
}
11 12

  
12 13
fi
lib/runscripts/table.run
4 4
#!/bin/bash -e
5 5
. "$(dirname "${BASH_SOURCE[0]}")"/path/to/table.run
6 6

  
7
func_override import__table_run
7 8
import ()
8 9
{
9 10
	echo_func
10 11
	before_import_cmds
11
	"$(dirname "${BASH_SOURCE[0]}")"/path/to/table.run "$FUNCNAME" "$@"
12
	import__table_run "$@"
12 13
	after_import_cmds
13 14
}
14 15
fi ####

Also available in: Unified diff