Project

General

Profile

« Previous | Next » 

Revision 9540

lib/sh/util.sh: log+(): PS4: split if statement onto multiple lines for clarity

View differences:

lib/sh/util.sh
248 248
log+()
249 249
{
250 250
	# no local vars because w/o cmd, assignments should be applied to caller
251
	PS4="$(if test "$1" -gt 0; then echo "$(str="${PS4:0:1}" n="$1" repeat)$PS4"
252
else echo "${PS4:$((-$1))}"; fi)" \
251
	PS4="$(
252
	if test "$1" -gt 0; then echo "$(str="${PS4:0:1}" n="$1" repeat)$PS4"
253
	else echo "${PS4:$((-$1))}"
254
	fi)" \
253 255
	verbosity="$(float+int "$verbosity" "-$1")" "${@:2}"
254 256
}
255 257
log++() { log+  1 "$@"; }

Also available in: Unified diff