Project

General

Profile

« Previous | Next » 

Revision 9547

lib/sh/binsearch.sh: binsearch(): echo $i at log_level 1 so it's displayed by default, as a progress indicator

View differences:

binsearch.sh
9 9
	echo_func; kw_params min max; : "${min?}" "${max?}"
10 10
	local min="$min" max="$max" i
11 11
	while true; do
12
		i=$(( (min + max)/2 )); echo_vars i
12
		i=$(( (min + max)/2 )); log- 2 echo_vars i
13 13
		if ! (( i > min )); then break; fi
14 14
		if echo_run "$@"; then min="$i"; echo_vars min
15 15
		else max="$i"; echo_vars max

Also available in: Unified diff