summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAnthony Basile <blueness@gentoo.org>2010-12-13 20:35:57 -0500
committerZac Medico <zmedico@gentoo.org>2010-12-13 19:56:39 -0800
commitb53e0000cbe1f4b5600d29224fb724b00e22088b (patch)
treeeabe6e06b3b5b072d852dc160f50fae55c304d9b /bin
parent8e5ffeaafef773d01caa14b5909af6d6ca32852a (diff)
downloadportage-b53e0000cbe1f4b5600d29224fb724b00e22088b.tar.gz
portage-b53e0000cbe1f4b5600d29224fb724b00e22088b.tar.bz2
portage-b53e0000cbe1f4b5600d29224fb724b00e22088b.zip
etc-update: tweak style in do_distconf()
Diffstat (limited to 'bin')
-rwxr-xr-xbin/etc-update12
1 files changed, 2 insertions, 10 deletions
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
}