[arch-projects] [PATCH 6/7] locale: fix locale.sh for zsh
Tom Gundersen
teg at jklm.no
Sat Oct 29 07:14:24 EDT 2011
On Wednesday 26 October 2011 19:49:29 Dave Reisner wrote:
> On Thu, Oct 27, 2011 at 01:38:32AM +0200, Tom Gundersen wrote:
> > Uglier script, but should now work with zsh as well as bash.
> >
> > Signed-off-by: Tom Gundersen <teg at jklm.no>
> > ---
> >
> > locale.sh | 77
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files
> > changed, 73 insertions(+), 4 deletions(-)
> >
> > diff --git a/locale.sh b/locale.sh
> > index e774659..4b4ef4e 100644
> > --- a/locale.sh
> > +++ b/locale.sh
> > @@ -1,10 +1,79 @@
> >
> > if [ -s /etc/rc.conf ]; then
> >
> > - LANG=$(. /etc/rc.conf 2> /dev/null ; echo "${LOCALE:=en_US.UTF-8}")
> > + LANG=$(. /etc/rc.conf 2> /dev/null ; echo "$LOCALE")
> >
> > fi
> >
> > +
> >
> > if [ -s /etc/locale.conf ]; then
> >
> > . /etc/locale.conf
> >
> > fi
>
> Minor optimization -- check for locale.conf first. If it exists, don't
> even read rc.conf. The legacy setting is only ever going to supply LANG,
> whereas locale.conf can supply LANG and a lot more.
I did this, but only in the case that LANG is not set in locale.conf, I want
LOCALE to still work in the case where someone just set some LC_ var
in locale.conf.
-t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20111029/ca0499bf/attachment.asc>
More information about the arch-projects
mailing list