summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvapier <vapier>2006-08-19 16:23:15 +0000
committervapier <vapier>2006-08-19 16:23:15 +0000
commit596929c1d39c128500da099919e3d44d6e551233 (patch)
treeecde3162581f61c05bd8c2687b95bc18ea406db7 /locale-gen
parentif the current locale is broken, dont let `locale -a` spew errors (diff)
downloadlocale-gen-596929c1d39c128500da099919e3d44d6e551233.tar.gz
locale-gen-596929c1d39c128500da099919e3d44d6e551233.tar.bz2
locale-gen-596929c1d39c128500da099919e3d44d6e551233.zip
make the status output a little nicer
Diffstat (limited to 'locale-gen')
-rwxr-xr-xlocale-gen13
1 files changed, 9 insertions, 4 deletions
diff --git a/locale-gen b/locale-gen
index da28e81..3fa5044 100755
--- a/locale-gen
+++ b/locale-gen
@@ -41,7 +41,7 @@ show_usage() {
exit 1
}
show_version() {
- local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.14 2006/08/19 16:17:52 vapier Exp $"
+ local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.15 2006/08/19 16:23:15 vapier Exp $"
cvsver=${cvsver##*locale-gen-}
echo "locale-gen-${cvsver%%,v *}"
exit 0
@@ -238,7 +238,10 @@ while [[ -n ${locales_to_generate[${lidx}]} ]] ; do
if [[ -n ${UPDATE} ]] && \
[[ ${existing_locales} == *" $(normalize ${locale}) "* ]]
then
- [[ ${QUIET} -eq 0 ]] && einfo " (${cnt}/${total}) Skipping ${disp}"
+ if [[ ${QUIET} -eq 0 ]] ; then
+ cnt_fmt=$(printf "%${#total}i" ${cnt})
+ einfo " (${cnt_fmt}/${total}) Skipping ${disp}"
+ fi
continue
fi
@@ -251,11 +254,13 @@ while [[ -n ${locales_to_generate[${lidx}]} ]] ; do
if [[ -z ${JUST_LIST} ]] ; then
if [[ -n ${ASK} ]] ; then
- einfon " (${cnt}/${total}) Generate ${disp} ? (Y/n) "
+ cnt_fmt=$(printf "%${#total}i" ${cnt})
+ einfon " (${cnt_fmt}/${total}) Generate ${disp} ? (Y/n) "
read user_answer
[[ ${user_answer} == [nN]* ]] && continue
elif [[ ${QUIET} -eq 0 ]] ; then
- ebegin " (${cnt}/${total}) Generating ${disp}"
+ cnt_fmt=$(printf "%${#total}i" ${cnt})
+ ebegin " (${cnt_fmt}/${total}) Generating ${disp}"
fi
localedef ${LOCALEDEF_OPTS} \
-i "${input}" \