Project

General

Profile

« Previous | Next » 

Revision 14407

lib/sh/util.sh: func_override(), copy_func(): added echo_func to facilitate debugging

View differences:

trunk/lib/sh/util.sh
284 284
copy_func() # usage: from=... to=... copy_func
285 285
# $to must not exist. to get around the no-clobber restriction, use `unset -f`.
286 286
{
287
	log++ echo_func
287 288
	: "${from:?}" "${to:?}"
288 289
	func_exists "$from" || die "function does not exist: $from"
289 290
	! func_exists "$to" || die "function already exists: $to"
......
292 293
}
293 294

  
294 295
func_override() # usage: func_override old_name__suffix
295
{ from="${1%__*}" to="$1" copy_func; }
296
{ log++ echo_func; from="${1%__*}" to="$1" copy_func; }
296 297

  
297 298
ensure_nested_func() # usage: func__nested_func() { ensure_nested_func; ... }
298 299
{

Also available in: Unified diff