Project

General

Profile

« Previous | Next » 

Revision 9157

lib/sh/util.sh: moved echo_run() to general command echoing section because it can also be used for internal commands

View differences:

util.sh
207 207
	log "$*"
208 208
}
209 209

  
210
alias echo_run_prep='cmd2rel_path; echo_cmd "$@"; cmd_indent'
211

  
212
fi # load new aliases
213
if self_being_included; then
214

  
215
echo_run() { echo_run_prep; "$@"; }
216

  
210 217
## internal commands
211 218

  
212 219
echo_eval() { log "$*"; builtin eval "$@"; }
......
222 229
	else "$@"; fi
223 230
}
224 231

  
225
alias echo_run_prep='cmd2rel_path; echo_cmd "$@"; cmd_indent'
226

  
227
fi # load new aliases
228
if self_being_included; then
229

  
230
echo_run() { echo_run_prep; "$@"; }
231

  
232 232
# auto-echo common external commands
233 233
for cmd in rm; do alias "$cmd=echo_run $cmd"; done; unset cmd
234 234

  

Also available in: Unified diff