summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvapier <vapier>2006-12-28 19:27:31 +0000
committervapier <vapier>2006-12-28 19:27:31 +0000
commit02eedd8bc7298fba290a1ddee436e79f7e4333e4 (patch)
tree3a6f7298336af04b59a42316f6e87a4beacf6cc9
parentfixup the SEE ALSO section (diff)
downloadlocale-gen-02eedd8bc7298fba290a1ddee436e79f7e4333e4.tar.gz
locale-gen-02eedd8bc7298fba290a1ddee436e79f7e4333e4.tar.bz2
locale-gen-02eedd8bc7298fba290a1ddee436e79f7e4333e4.zip
add an --all option
-rwxr-xr-xlocale-gen7
1 files changed, 6 insertions, 1 deletions
diff --git a/locale-gen b/locale-gen
index cf46063..5b5d4c0 100755
--- a/locale-gen
+++ b/locale-gen
@@ -25,6 +25,7 @@ show_usage() {
${GOOD}-c, --config <config>${NORMAL} Use specified config instead of default locale.gen
${GOOD}-l, --list${NORMAL} List all the locales to be generated
${GOOD}-a, --ask${NORMAL} Ask before generating each locale
+ ${GOOD}-A, --all${NORMAL} Pretend the locale list contains all locales
${GOOD}-u, --update${NORMAL} Only generate locales that are missing
${GOOD}-j, --jobs${NORMAL} Number of locales to generate at a time (parallel)
${GOOD}-q, --quiet${NORMAL} Only show errors
@@ -43,7 +44,7 @@ show_usage() {
}
show_version() {
local Header=""
- local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.17 2006/10/03 05:28:08 vapier Exp $"
+ local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.18 2006/12/28 19:27:31 vapier Exp $"
cvsver=${cvsver##*locale-gen,v }
echo "locale-gen-${cvsver%% *}"
exit 0
@@ -57,6 +58,7 @@ DESTDIR=""
CONFIG=""
JUST_LIST=""
ASK=""
+ALL=""
UPDATE=""
QUIET=0
JOBS_MAX=1
@@ -67,6 +69,7 @@ while [[ -n $1 ]] ; do
-c|--config) shift; CONFIG=$1;;
-l|--list) JUST_LIST=$1;;
-a|--ask) ASK=$1;;
+ -A|--all) ALL=$1;;
-u|--update) UPDATE=$1;;
-j|--jobs) shift; JOBS_MAX=$(($1));;
-q|--quiet) ((++QUIET));;
@@ -106,6 +109,8 @@ CHARMAPS=${DESTDIR}usr/share/i18n/charmaps
SUPPORTED=${DESTDIR}usr/share/i18n/SUPPORTED
ALIAS=${DESTDIR}usr/share/locale/locale.alias
+[[ -n ${ALL} ]] && LOCALEGEN=${SUPPORTED}
+
# Extract the location of the locale dir on the fly as `localedef --help` has:
# locale path : /usr/lib64/locale:/usr/share/i18n
LOCALEDIR=${DESTDIR}$(LC_ALL="C" localedef --help | sed -n -e '/locale path/{s|.* : ||;s|:.*||;p}')