SOURCES: mozilla-sunbird.sh (NEW) - based on mozilla-thunderbird.sh
glen
glen at pld-linux.org
Sun Oct 28 00:09:46 CEST 2007
Author: glen Date: Sat Oct 27 22:09:46 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- based on mozilla-thunderbird.sh
---- Files affected:
SOURCES:
mozilla-sunbird.sh (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mozilla-sunbird.sh
diff -u /dev/null SOURCES/mozilla-sunbird.sh:1.1
--- /dev/null Sun Oct 28 00:09:46 2007
+++ SOURCES/mozilla-sunbird.sh Sun Oct 28 00:09:41 2007
@@ -0,0 +1,39 @@
+#!/bin/sh
+# based on script by (c) vip at linux.pl, wolf at pld-linux.org
+
+LIBDIR="@LIBDIR@/mozilla-sunbird"
+
+MOZARGS=
+MOZLOCALE="$(/usr/bin/locale | grep "^LC_MESSAGES=" | \
+ sed -e "s|LC_MESSAGES=||g" -e "s|\"||g" )"
+for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
+ eval MOZLANG="$(echo $MOZLANG | sed -e "s|_\([^.]*\).*|-\1|g")"
+
+ if [ -f $LIBDIR/chrome/$MOZLANG.jar ]; then
+ MOZARGS="-UILocale $MOZLANG"
+ break
+ fi
+done
+
+if [ -z "$MOZARGS" ]; then
+ # try harder
+ for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
+ eval MOZLANG="$(echo $MOZLANG | sed -e "s|_.*||g")"
+
+ LANGFILE=$(echo ${MOZILLA_FIVE_HOME}/chrome/${MOZLANG}*.jar \
+ | sed 's/\s.*//g' )
+ if [ -f "$LANGFILE" ]; then
+ MOZLANG=$(basename "$LANGFILE" | sed 's/\.jar//')
+ MOZARGS="-UILocale $MOZLANG"
+ break
+ fi
+ done
+fi
+
+if [ -n "$MOZARGS" ]; then
+ SUNBIRD="$LIBDIR/sunbird $MOZARGS"
+else
+ SUNBIRD="$LIBDIR/sunbird"
+fi
+
+exec $SUNBIRD "$@"
================================================================
More information about the pld-cvs-commit
mailing list