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