Project

General

Profile

« Previous | Next » 

Revision 8211

lib/import.sh: functions: abort if a command encounters an error

View differences:

import.sh
34 34

  
35 35
map_table ()
36 36
{
37
	make --directory=.. --makefile=../input.Makefile "$table"/map.csv
37
	make --directory=.. --makefile=../input.Makefile "$table"/map.csv || return
38 38
	(psql <<EOF
39 39
SELECT util.reset_map_table('pg_temp.map');
40 40
\copy pg_temp.map FROM 'map.csv' CSV HEADER;
41 41
SELECT util.set_col_names('"$table"', 'pg_temp.map'::regclass);
42 42
EOF
43
	)
43
	) || return
44 44
}
45 45

  
46 46
mk_derived () { "$root_dir"/schemas/VegCore/mk_derived; }

Also available in: Unified diff