]> git.pld-linux.org Git - packages/icedove.git/blame - icedove.sh
- avoid subdirs
[packages/icedove.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
ER
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 ~/.icedove/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
16 if [[ -f ${f} && ${f} -ot "$0" ]]; then
17 echo "Removing ${f} leftover from older Icedove"
18 rm -f "${f}"
19 fi
20done
21
9dfe955f 22ICEDOVE="$LIBDIR/icedove"
ceb3e54a 23
24if [ "$1" == "-remote" ]; then
25 $ICEDOVE "$@"
26else
91d856da 27 PING=$($ICEDOVE -remote 'ping()' 2>&1 >/dev/null)
ceb3e54a 28 if [ -n "$PING" ]; then
88b2e431 29 exec $ICEDOVE "$@"
ceb3e54a 30 else
31 case "$1" in
88b2e431
ER
32 -compose|-editor)
33 exec $ICEDOVE -remote 'xfeDoCommand (composeMessage)'
ceb3e54a 34 ;;
88b2e431
ER
35 *)
36 exec $ICEDOVE -remote 'xfeDoCommand (openInbox)'
ceb3e54a 37 ;;
38 esac
39 fi
40fi
This page took 0.096122 seconds and 4 git commands to generate.