summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvapier <vapier>2006-04-30 15:39:09 +0000
committervapier <vapier>2006-04-30 15:39:09 +0000
commitb34da8a6fa6a3f8fff3803c62a6f6dd98deec569 (patch)
tree4e535f3903e835c54e353fe7a6ed93ba10452f36 /locale-gen
parentrewrite code a bit so we run sed once for all locales instead of two or three... (diff)
downloadlocale-gen-b34da8a6fa6a3f8fff3803c62a6f6dd98deec569.tar.gz
locale-gen-b34da8a6fa6a3f8fff3803c62a6f6dd98deec569.tar.bz2
locale-gen-b34da8a6fa6a3f8fff3803c62a6f6dd98deec569.zip
add a sanity check to make sure localedef --help worked #131780
Diffstat (limited to 'locale-gen')
-rwxr-xr-xlocale-gen7
1 files changed, 6 insertions, 1 deletions
diff --git a/locale-gen b/locale-gen
index 724db03..0623067 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.8 2006/04/25 01:17:03 vapier Exp $"
+ local cvsver="$Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v 1.9 2006/04/30 15:39:09 vapier Exp $"
cvsver=${cvsver##*locale-gen-}
echo "locale-gen-${cvsver%%,v *}"
exit 0
@@ -105,6 +105,11 @@ ALIAS=${DESTDIR}usr/share/locale/locale.alias
# Extract the location of the locale dir on the fly as `localedef --help` has:
# locale path : /usr/lib64/locale:/usr/share/i18n
LOCALEDIR=${DESTDIR}$(localedef --help | sed -n -e '/locale path/{s|.* : ||;s|:.*||;p}')
+if [[ $? -ne 0 ]] || [[ -z ${LOCALEDIR} ]] || [[ ${LOCALEDIR} != ${DESTDIR}/usr/lib*/locale ]] ; then
+ eerror "Unable to parse the output of your localedef utility." 1>&2
+ eerror "File a bug about this issue and include the output of 'localedef --help'." 1>&2
+ exit 1
+fi