diff options
-rwxr-xr-x | locale-gen | 31 | ||||
-rw-r--r-- | locale-gen.8 | 3 | ||||
-rw-r--r-- | locale.gen.5 | 6 |
3 files changed, 36 insertions, 4 deletions
@@ -45,7 +45,7 @@ show_usage() { } show_version() { local Header="" - local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.23 2007/07/22 21:25:15 vapier Exp $" + local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.24 2007/12/29 21:34:46 vapier Exp $" cvsver=${cvsver##*locale-gen,v } echo "locale-gen-${cvsver%% *}" exit 0 @@ -53,7 +53,7 @@ show_version() { -LOCALEDEF_OPTS="--no-archive -c" +LOCALEDEF_OPTS="-c" KEEP="" DESTDIR="" CONFIG="" @@ -65,6 +65,7 @@ GENERATE="" JOBS_MAX=1 QUIET=0 SET_X="" +LOCALE_ARCHIVE=true while [[ -n $1 ]] ; do case $1 in -k|--keep|--keep-existing) KEEP=$1;; @@ -118,6 +119,32 @@ CHARMAPS=${DESTDIR}usr/share/i18n/charmaps SUPPORTED=${DESTDIR}usr/share/i18n/SUPPORTED ALIAS=${DESTDIR}usr/share/locale/locale.alias +# +# Grab any user options in their config file +options=$(sed -n \ + -e '/^[[:space:]]*#%/s:^[[:space:]]*#%[[:space:]]*::p'\ + "${CONFIG}" +) +IFS=$'\n' +for option in ${options} ; do + case ${option} in + no-locale-archive) + LOCALE_ARCHIVE=false + ;; + *) + ewarn "Unrecognized option '${option}'" + ;; + esac +done +unset IFS + +if ${LOCALE_ARCHIVE} ; then + if [[ ${JOBS_MAX} != 1 ]] ; then + ewarn "Generating locale-archive: forcing # of jobs to 1" + JOBS_MAX=1 + fi +fi + [[ -n ${ALL} ]] && CONFIG=${SUPPORTED} # Extract the location of the locale dir on the fly as `localedef --help` has: diff --git a/locale-gen.8 b/locale-gen.8 index 7605c58..669c487 100644 --- a/locale-gen.8 +++ b/locale-gen.8 @@ -50,8 +50,7 @@ Report the program version \fB\-\-\fR To pass custom options directly to the \fBlocaledef\fR utility, end the \fBlocale\-gen\fR option list with \-\- and then everything after that will be -passed on through unmolested (the options \-c \-\-no\-archive are passed by -default) +passed on through unmolested (the options \-c are passed by default) .SH "AUTHORS" .fi Mike Frysinger <vapier@gentoo.org> diff --git a/locale.gen.5 b/locale.gen.5 index 88b2711..58bacc7 100644 --- a/locale.gen.5 +++ b/locale.gen.5 @@ -35,6 +35,12 @@ The command will generate all the locales, placing them in \fB/usr/lib/locale\fP. +Comments start with the hash mark # and may only be on new lines. + +Options start with #% (to preserve backwards compatibility). The only option +currently recognized is \fIno-locale-archive\fR. This will disable generation +of the locale archive file and instead generate multiple files/directories for +each locale. .SH "SEE ALSO" .BR locale-gen (8), .BR localedef (1), |