Mnemosyne is a abstract distribution originally designed for ROCKLinux, but currently only support the trunk of OpenSDE.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.5 KiB

#!/bin/sh
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: target/mnemosyne2/pkg_conf/thunderbird.conf
# Copyright (C) 2004 - 2005 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- T2-COPYRIGHT-NOTE-END ---
hook_add postmake 6 'mnemosyne_thunderbird_mailto'
hook_add postmake 6 'mnemosyne_thunderbird_prefs'
mnemosyne_thunderbird_mailto() {
cat <<-EOT > $bindir/$pkg-mailto.sh
#!/bin/bash
export MOZILLA_FIVE_HOME="$libdir/$pkg-$ver"
mailto="\$1"
if [[ \$mailto == mailto:* ]]; then
mailto=\${mailto#mailto:}
fi
if \$MOZILLA_FIVE_HOME/mozilla-xremote-client -a thunderbird 'ping()'; then
exec \$MOZILLA_FIVE_HOME/mozilla-xremote-client -a thunderbird mailto\("\$mailto"\)
else
exec $bindir/thunderbird "mailto:\$mailto"
fi
EOT
chmod +x $bindir/$pkg-mailto.sh
}
mnemosyne_thunderbird_prefs() {
if pkginstalled firefox; then
cat<<-EOT >> $libdir/${pkg}-${ver}/defaults/pref/all-thunderbird.js
pref("network.protocol-handler.app.http", "firefox-openurl.sh");
pref("network.protocol-handler.app.https", "firefox-openurl.sh");
pref("network.protocol-handler.app.ftp", "firefox-openurl.sh");
EOT
fi
}