2 # based on script by (c) vip at linux.pl, wolf at pld-linux.org
4 LIBDIR="@LIBDIR@/icedove"
6 # copy profile from Thunderbird if its available and if no Icedove
8 if [ ! -d $HOME/.icedove ]; then
9 if [ -d $HOME/.thunderbird ]; then
10 echo "Copying profile from Thunderbird"
11 cp -rf $HOME/.thunderbird $HOME/.icedove
16 MOZLOCALE="$(/usr/bin/locale | grep "^LC_MESSAGES=" | \
17 sed -e "s|LC_MESSAGES=||g" -e "s|\"||g" )"
18 for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
19 eval MOZLANG="$(echo $MOZLANG | sed -e "s|_\([^.]*\).*|-\1|g")"
21 if [ -f $LIBDIR/chrome/$MOZLANG.jar ]; then
22 MOZARGS="-UILocale $MOZLANG"
27 if [ -z "$MOZARGS" ]; then
29 for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
30 eval MOZLANG="$(echo $MOZLANG | sed -e "s|_.*||g")"
32 LANGFILE=$(echo ${MOZILLA_FIVE_HOME}/chrome/${MOZLANG}*.jar \
34 if [ -f "$LANGFILE" ]; then
35 MOZLANG=$(basename "$LANGFILE" | sed 's/\.jar//')
36 MOZARGS="-UILocale $MOZLANG"
42 if [ -n "$MOZARGS" ]; then
43 ICEDOVE="$LIBDIR/icedove $MOZARGS"
45 ICEDOVE="$LIBDIR/icedove"
48 if [ "$1" == "-remote" ]; then
51 PING=`$ICEDOVE -remote 'ping()' 2>&1 >/dev/null`
52 if [ -n "$PING" ]; then
57 $ICEDOVE -remote 'xfeDoCommand (composeMessage)'
60 $ICEDOVE -remote 'xfeDoCommand (openInbox)'