Project

General

Profile

« Previous | Next » 

Revision 9185

lib/sh/util.sh: echo_*func aliases: use simpler && syntax (with `|| true` to prevent errexit if the condition is false) instead of an if statement. this also allows prefixing the alias with var definitions.

View differences:

lib/sh/util.sh
234 234
## functions
235 235

  
236 236
# usage: func() { echo_func; ... }
237
function echo_func() # usage: if "echo_func" "$@"; then indent; fi
237
function echo_func() # usage: "echo_func" "$@" && indent || true
238 238
# exit status: whether function call was echoed
239 239
{
240 240
	log++

Also available in: Unified diff