Project

General

Profile

« Previous | Next » 

Revision 8710

lib/util.run: added $verbose var to control logging. this is normally set to 0, but defaults to 2 for a runscript.

View differences:

util.run
17 17
}
18 18
fi ####
19 19

  
20
: "${verbose=2}"
21

  
20 22
include_guard_var () { readlink -f -- "$1"|sed 's/[^a-zA-Z0-9_]/_/g'; }
21 23

  
22 24
self_not_included () # usage: if self_not_included; then ... fi
......
38 40
	for (( i=$#; i >= 1; i-- )); do printf '%q ' "${!i}"; done
39 41
}
40 42

  
43
: "${verbose=0}"
44

  
41 45
echo_cmd () { echo "$PS4$*" >&2; }
42 46

  
43 47
echo_run () { echo_cmd "$@"; "$@"; }

Also available in: Unified diff