]> git.pld-linux.org Git - packages/thunderbird.git/blame - thunderbird.sh
- up to 52.0.1, still crashes
[packages/thunderbird.git] / thunderbird.sh
CommitLineData
4b2ee400
JR
1#!/bin/sh
2# based on script by (c) vip at linux.pl, wolf at pld-linux.org
3
4LIBDIR="@LIBDIR@/thunderbird"
5
6# copy profile from Icedove if its available and if no Thunderbird
7# profile exists
8if [ ! -d $HOME/.thunderbird ] && [ -d $HOME/.icedove ]; then
9 echo "Copying profile from Icedove"
10 cp -a $HOME/.icedove $HOME/.thunderbird
11fi
12
13# compreg.dat and/or chrome.rdf will screw things up if it's from an
14# older version. http://bugs.gentoo.org/show_bug.cgi?id=63999
15for f in ~/.thunderbird/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
16 [ -f "$f" ] || continue
17 if [ "$f" -ot "$0" ] || [ "$f" -ot "$LIBDIR/components/compreg.dat" ]; then
18 echo "Removing $f leftover from older Thunderbird"
19 rm -f "$f"
20 fi
21done
22
23THUNDERBIRD="$LIBDIR/thunderbird"
24
25if [ "$1" = "-remote" ]; then
26 exec $THUNDERBIRD "$@"
27else
28 PING=$($THUNDERBIRD -remote 'ping()' 2>&1 >/dev/null)
29 if [ -n "$PING" ]; then
30 exec $THUNDERBIRD "$@"
31 else
32 case "$1" in
33 -compose|-editor)
34 exec $THUNDERBIRD -remote 'xfeDoCommand (composeMessage)'
35 ;;
36 *)
37 exec $THUNDERBIRD -remote 'xfeDoCommand (openInbox)'
38 ;;
39 esac
40 fi
41fi
This page took 0.028827 seconds and 4 git commands to generate.