From: Zac Medico Date: Mon, 13 Dec 2010 06:22:53 +0000 (-0800) Subject: etc-update: replace 'seq' with pure bash X-Git-Tag: v2.1.9.26~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8e5ffeaafef773d01caa14b5909af6d6ca32852a;p=portage.git etc-update: replace 'seq' with pure bash --- diff --git a/bin/etc-update b/bin/etc-update index d4ed6e689..3e7bd4f72 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -460,11 +460,13 @@ do_distconf() { local suffix local efile - for count in $(seq 0 9999); do + count=0 + while true ; do size=${#count} - let fill=$((4-$size)) + fill=$((4-$size)) suffix=".dist_" - for f in $(seq 1 $fill); do + while [ $fill -gt 0 ] ; do + ((fill--)) suffix+="0" done suffix+="${count}" @@ -474,6 +476,7 @@ do_distconf() { mv ${mv_opts} ${file} ${efile} break fi + ((count++)) done }