summaryrefslogtreecommitdiffstats
path: root/thunderbird.sh.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-04-30 16:08:29 +0200
committerRemi Collet <fedora@famillecollet.com>2011-04-30 16:08:29 +0200
commit729c17e0ad1e9d1d540f2669cbd072a8afc139c2 (patch)
tree0cca2f05cb3fac9367e49bfda39876b031ad9cc6 /thunderbird.sh.in
parent036a7f0c7e7bd2606b048a34f8a12c739ee1c813 (diff)
thunderbird, sync with rawhide, update to 3.1.10
Diffstat (limited to 'thunderbird.sh.in')
-rw-r--r--thunderbird.sh.in32
1 files changed, 13 insertions, 19 deletions
diff --git a/thunderbird.sh.in b/thunderbird.sh.in
index 0630fd3..cf8d3ec 100644
--- a/thunderbird.sh.in
+++ b/thunderbird.sh.in
@@ -99,26 +99,20 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
- # Try to link global langpacks to an extension directory
- if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
- if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org ]; then
- rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org" > /dev/null 2>&1
- fi
- if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org ]; then
- ln -s $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org \
- $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org
- echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org" > $FEDORA_LANGPACK_CONFIG
+ function create_langpack_link() {
+ local language=$*
+ local langpack=langpack-${language}@thunderbird.mozilla.org
+ if [ -f $MOZ_LANGPACKS_DIR/$langpack/chrome.manifest ]; then
+ rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+ ln -s $MOZ_LANGPACKS_DIR/$langpack \
+ $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+ echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG
+ return 0
fi
- elif [ -f $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org/chrome/$MOZLOCALE.jar ]; then
- if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org ]; then
- rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org" > /dev/null 2>&1
- fi
- if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org ]; then
- ln -s $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org \
- $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org
- echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org" > $FEDORA_LANGPACK_CONFIG
- fi
- fi
+ return 1
+ }
+
+ create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true
fi
exec $MOZ_PROGRAM "$@"