Project

General

Profile

« Previous | Next » 

Revision 14773

lib/runscripts/table.run: 1st_src(): use a variable for this instead, to avoid needing to run this function each time it's used, and to make @srcs available

View differences:

trunk/lib/runscripts/table.run
45 45

  
46 46
map_table="\"~$table.map\"" # sort after other tables to avoid clutter
47 47

  
48
1st_src()
49
{
50
	echo_func
51
	echo "$datasrc_dir/$(echo1 $(output_data=1 table_make list_srcs|echo_stdout))"
52
}
48
srcs=($(output_data=1 table_make list_srcs))
49
srcs=("${srcs/#/$datasrc_dir/}") # empty str at start (/#) -> $datasrc_dir/
50
_1st_src="$(echo1 "${srcs[@]}")"
53 51

  
54 52
##### targets
55 53

  
56
header.txt() { begin_target; to_target head -1 "$(1st_src)"; }
54
header.txt() { begin_target; to_target head -1 "$_1st_src"; }
57 55

  
58 56
load_data()
59 57
{

Also available in: Unified diff