Project

General

Profile

« Previous | Next » 

Revision 8910

lib/util.sh: use extern instead of env to run external commands, because it's simpler and auto-captures the logging output

View differences:

lib/runscripts/table.run
27 27
input_make ()
28 28
{
29 29
	echo_func
30
	env make --directory="$top_dir"/.. "${@/#/$table/}"
30
	extern make --directory="$top_dir"/.. "${@/#/$table/}"
31 31
}
32 32

  
33 33
map_table ()
lib/util.sh
135 135

  
136 136
sed_ere_flag="$(test "$(uname)" = Darwin && echo E || echo r)"
137 137

  
138
sed () { env sed -"$sed_ere_flag" "$@";}
138
sed () { extern sed -"$sed_ere_flag" "$@";}
139 139

  
140 140
#### vars
141 141

  
......
192 192
make ()
193 193
{
194 194
	echo_func
195
	env make --directory="$top_dir" "$@"
195
	extern make --directory="$top_dir" "$@"
196 196
}
197 197

  
198 198
if false; then ## usage:
......
225 225

  
226 226
zip ()
227 227
{
228
	try env zip "$@" >&2
228
	try extern zip "$@" >&2
229 229
	ignore 12 # "zip has nothing to do" (`man zip`)
230 230
	end_try
231 231
}
232 232

  
233
unzip () { env unzip "$@" >&2; }
233
unzip () { extern unzip "$@" >&2; }
234 234

  
235 235
set_inv force
236 236
alias zip_newer="zip${no_force:+ -u}"
......
271 271
	if test -n "$schema"; then local database="${database-$schema}"; fi
272 272
	
273 273
	local var=ssh_dest; local_inv
274
	echo_run ${no_ssh_dest:+env }${ssh_dest:+ssh "$ssh_dest" }"${FUNCNAME[1]}" \
274
	extern ${ssh_dest:+ssh "$ssh_dest" }"${FUNCNAME[1]}" \
275 275
${server:+ --host="$server" }${user:+--user="$user" } --password\
276 276
${password+="$password"} ${database:+--databases "$database" --tables } "$@"
277 277
}

Also available in: Unified diff