Revision 12822
Added by Aaron Marcuse-Kubitza almost 11 years ago
util.sh | ||
---|---|---|
456 | 456 |
log+() |
457 | 457 |
{ |
458 | 458 |
# no local vars because w/o cmd, assignments should be applied to caller |
459 |
PS4="$(str="${PS4:0:1}" n=$((log_level+$1-1)) repeat)${PS4: -2}"; \
|
|
459 |
PS4="$(str="${PS4:0:1}" n=$((log_level+$1-1)) repeat)${PS4: -2}" \ |
|
460 | 460 |
log_level=$((log_level+$1)) \ |
461 | 461 |
"${@:2}" |
462 | 462 |
} |
Also available in: Unified diff
bugfix: lib/sh/util.sh: log+(): removed spurious ; between setting of PS4 and log_level, which was causing erratic mismatches between PS4 and log_level. (the ; caused $PS4 to be set in the caller when invoked via one of the clog* aliases, rather than being passed as a command-specific env var.)