SOURCES: imieniny.sh - LC_TIME has nothing to do with imieniny dat...
ankry
ankry at pld-linux.org
Tue Oct 2 14:18:05 CEST 2007
Author: ankry Date: Tue Oct 2 12:18:05 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- LC_TIME has nothing to do with imieniny database choice (but is LC_MESSAGES any better?)
- use locale-dependent date format
- error messages to STDERR, don't stop silently
---- Files affected:
SOURCES:
imieniny.sh (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SOURCES/imieniny.sh
diff -u SOURCES/imieniny.sh:1.4 SOURCES/imieniny.sh:1.5
--- SOURCES/imieniny.sh:1.4 Sat Aug 25 17:19:34 2007
+++ SOURCES/imieniny.sh Tue Oct 2 14:18:00 2007
@@ -15,8 +15,8 @@
if [ -n "$LC_ALL" ]; then
LANGNAME="$LC_ALL"
-elif [ -n "$LC_TIME" ]; then
- LANGNAME="$LC_TIME"
+elif [ -n "$LC_MESSAGES" ]; then
+ LANGNAME="$LC_MESSAGES"
elif [ -n "${LANG}" ]; then
LANGNAME="$LANG"
else
@@ -24,17 +24,18 @@
fi
if [ ! -d $DATADIR/$LANGNAME ]; then
+ echo "Unsupported locale configuration." >&2
exit 1
fi
case "$LANGNAME" in
pl_PL*|pl)
- echo -n "`date +%Y.%m.%d`, imieniny "
+ echo -n "`date +%x`, imieniny "
print_nameday
exit $?
;;
*)
- echo "Error: $LANG directory exists, but is not supported."
+ echo "Error: $LANG directory exists, but is not supported." >&2
exit 1
;;
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/imieniny.sh?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list