Project

General

Profile

« Previous | Next » 

Revision 10154

*{.sh,run}: use new log-() instead of log+() with a negative #

View differences:

lib/sh/util.sh
351 351
	verbosity="$(float+int "$verbosity" "-$1")" "${@:2}"
352 352
}
353 353
log-() { log+ "-$1" "${@:2}"; }
354
log++() { log+  1 "$@"; }
355
log--() { log+ -1 "$@"; }
354
log++() { log+ 1 "$@"; }
355
log--() { log- 1 "$@"; }
356 356
alias log_local=\
357 357
'declare PS4="$PS4" log_level="$log_level" verbosity="$verbosity"'
358 358
alias log+='log_local; "log+"' # don't expand next word because it's not a cmd
......
707 707
		if ! contains "$path" "$@"; then new_paths+=("$path"); fi
708 708
	done
709 709
	PATH="$(delim=: join "${new_paths[@]}")" || return
710
	log+ -2
710
	log- 2
711 711
	echo_vars PATH
712 712
}
713 713

  
lib/sh/binsearch.sh
9 9
	echo_func; kw_params min max; : "${min?}" "${max?}"
10 10
	local min="$min" max="$max" i iter_num=0
11 11
	while true; do
12
		log+ -2 echo_vars iter_num # it will always take log2(max - min) iters
12
		log- 2 echo_vars iter_num # it will always take log2(max - min) iters
13 13
		
14 14
		i=$(( (min + max)/2 ))
15
		log+ -2 echo_vars min max i
15
		log- 2 echo_vars min max i
16 16
		if ! (( i > min )); then break; fi
17 17
		if echo_run "$@"; then min="$i"; else max="$i"; fi
18 18
		
lib/sh/db.sh
238 238
	echo_func; kw_params stdin
239 239
	
240 240
	use_pg
241
	log+ -2
241
	log- 2
242 242
	local PGHOST="$server";       export PGHOST
243 243
	local PGUSER="$user";         export PGUSER
244 244
	local PGPASSWORD="$password"; export PGPASSWORD

Also available in: Unified diff