|
|
#!/bin/sh . $confdir/thunderbird.conf
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 }
|