Project

General

Profile

« Previous | Next » 

Revision 12697

lib/runscripts/util.run: added fwd_self alias

View differences:

trunk/lib/runscripts/util.run
76 76
# (instead of as args to the same command, the way runscripts do)
77 77
{ echo_func; for cmd in "$@"; do time echo_run "$cmd"; done; }
78 78

  
79
fwd() # usage: subdirs=(...); fwd "$FUNCNAME" "$@"
79
fwd() # usage: subdirs=(...); fwd target args... # or use fwd_self
80 80
{
81 81
	echo_func
82 82
	: "${subdirs?}"
83 83
	
84 84
	for subdir in "${subdirs[@]}"; do "$top_dir"/"$subdir"/run "$@"; done
85 85
}
86
alias fwd_self='fwd "$FUNCNAME" "$@"' # usage: target() { ...; fwd_self; }
86 87

  
87 88
: "${auto_fwd=}" # usage: auto_fwd=1; . .../file_including_util.run
88 89
if test "$auto_fwd"; then

Also available in: Unified diff