Project

General

Profile

« Previous | Next » 

Revision 8277

lib/util.run: echo_cmd(): Renamed to echo_run for clarity, because it also runs the command

View differences:

lib/table.run
9 9
import ()
10 10
{
11 11
	before_import_cmds
12
	echo_cmd "$(dirname "${BASH_SOURCE[0]}")"/path/to/table.run import
12
	echo_run "$(dirname "${BASH_SOURCE[0]}")"/path/to/table.run import
13 13
	after_import_cmds
14 14
}
15 15

  
......
42 42
SET search_path TO "$schema", util;
43 43
EOF
44 44
	cat)|
45
	echo_cmd env no_search_path=1 "$bin_dir"/psql_verbose_vegbien "$@"
45
	echo_run env no_search_path=1 "$bin_dir"/psql_verbose_vegbien "$@"
46 46
}
47 47

  
48 48
input_make ()
49 49
{
50
	echo_cmd env make --directory="$top_dir"/.. "${@/#/$table/}"
50
	echo_run env make --directory="$top_dir"/.. "${@/#/$table/}"
51 51
}
52 52

  
53 53
map_table ()
......
64 64

  
65 65
remake_VegBIEN_mappings ()
66 66
{
67
	echo_cmd rm header.csv map.csv # remake them
67
	echo_run rm header.csv map.csv # remake them
68 68
	yes|input_make test
69 69
}
70 70

  
......
76 76

  
77 77
import ()
78 78
{
79
	echo_cmd map_table
80
	echo_cmd postprocess
81
	echo_cmd mk_derived
79
	echo_run map_table
80
	echo_run postprocess
81
	echo_run mk_derived
82 82
}
83 83

  
84 84
run_cmd "$@"
lib/util.run
20 20
run_cmd "$@"
21 21
fi ####
22 22

  
23
echo_cmd () { echo "$PS4$*" >&2; "$@"; }
23
echo_run () { echo "$PS4$*" >&2; "$@"; }
24 24

  
25 25
echo_stdin () { tee -a /dev/stderr; } # usage: input|echo_stdin|cmd
26 26

  
......
40 40
fwd ()
41 41
{
42 42
	for subdir in "${subdirs[@]}"; do
43
		echo_cmd "$(dirname "${BASH_SOURCE[1]}")"/"$subdir"/run "$@"
43
		echo_run "$(dirname "${BASH_SOURCE[1]}")"/"$subdir"/run "$@"
44 44
	done
45 45
}
46 46

  
47
make () { echo_cmd env make --directory="$top_dir" "$@"; }
47
make () { echo_run env make --directory="$top_dir" "$@"; }
48 48

  
49 49
if false; then ## usage:
50 50
inline_make <<'EOF'

Also available in: Unified diff