From: Anthony Basile Date: Tue, 14 Dec 2010 01:35:57 +0000 (-0500) Subject: etc-update: tweak style in do_distconf() X-Git-Tag: v2.2.0_alpha9~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7081c7240a2cd234eac545279b294efa48ef4878;p=portage.git etc-update: tweak style in do_distconf() --- diff --git a/bin/etc-update b/bin/etc-update index 3e7bd4f72..d3b988ab6 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -454,29 +454,21 @@ do_distconf() { local file="${1}" local ofile="${2}" local -i count - local -i size local -i fill - local -i f local suffix local efile - count=0 - while true ; do - size=${#count} - fill=$((4-$size)) + for ((count = 0; count <= 9999; count++)); do suffix=".dist_" - while [ $fill -gt 0 ] ; do - ((fill--)) + for ((fill = 4 - ${#count}; fill > 0; fill--)); do suffix+="0" done suffix+="${count}" efile="${ofile}${suffix}" if [[ ! -f ${efile} ]]; then - echo ${efile} mv ${mv_opts} ${file} ${efile} break fi - ((count++)) done }