diff options
author | vapier <vapier> | 2006-08-19 16:23:15 +0000 |
---|---|---|
committer | vapier <vapier> | 2006-08-19 16:23:15 +0000 |
commit | 596929c1d39c128500da099919e3d44d6e551233 (patch) | |
tree | ecde3162581f61c05bd8c2687b95bc18ea406db7 | |
parent | if the current locale is broken, dont let `locale -a` spew errors (diff) | |
download | locale-gen-596929c1d39c128500da099919e3d44d6e551233.tar.gz locale-gen-596929c1d39c128500da099919e3d44d6e551233.tar.bz2 locale-gen-596929c1d39c128500da099919e3d44d6e551233.zip |
make the status output a little nicer
-rwxr-xr-x | locale-gen | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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}" \ |