]> git.pld-linux.org Git - packages/thunderbird.git/blame - icedove.sh
- drop unneeded patch
[packages/thunderbird.git] / icedove.sh
CommitLineData
ceb3e54a 1#!/bin/sh
2# based on script by (c) vip at linux.pl, wolf at pld-linux.org
3
4LIBDIR="@LIBDIR@/icedove"
5
e98019c8 6# copy profile from Thunderbird if its available and if no Icedove
7# profile exists
91d856da
ER
8if [ ! -d $HOME/.icedove ] && [ -d $HOME/.thunderbird ]; then
9 echo "Copying profile from Thunderbird"
10 cp -a $HOME/.thunderbird $HOME/.icedove
e98019c8 11fi
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 15for 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
21done
22
0889474f 23ICEDOVE="$LIBDIR/icedove"
ceb3e54a 24
de24ae35
ER
25if [ "$1" = "-remote" ]; then
26 exec $ICEDOVE "$@"
ceb3e54a 27else
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 33 -compose|-editor)
0889474f 34 exec $ICEDOVE -remote 'xfeDoCommand (composeMessage)'
ceb3e54a 35 ;;
88b2e431 36 *)
0889474f 37 exec $ICEDOVE -remote 'xfeDoCommand (openInbox)'
ceb3e54a 38 ;;
39 esac
40 fi
41fi
This page took 0.041828 seconds and 4 git commands to generate.