Revision 9480
Added by Aaron Marcuse-Kubitza over 11 years ago
util.sh | ||
---|---|---|
245 | 245 |
{ |
246 | 246 |
# no local vars because w/o cmd, assignments should be applied to caller |
247 | 247 |
PS4="$(if test "$1" -gt 0; then echo "$(str="${PS4:0:1}" n="$1" repeat)$PS4" |
248 |
else echo "${PS4: -$1}"; fi)" \
|
|
248 |
else echo "${PS4:$((-$1))}"; fi)" \
|
|
249 | 249 |
verbosity="$(float+int "$verbosity" "-$1")" "${@:2}" |
250 | 250 |
} |
251 | 251 |
log++() { log+ 1 "$@"; } |
Also available in: Unified diff
bugfix: lib/sh/util.sh: log+(): adjustment < 0: need to enclose -$1 in $(()) so it gets evaluated before being used as an array index