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.

36 lines
962 B

  1. #!/bin/sh
  2. . $confdir/thunderbird.conf
  3. hook_add postmake 6 'mnemosyne_thunderbird_mailto'
  4. hook_add postmake 6 'mnemosyne_thunderbird_prefs'
  5. mnemosyne_thunderbird_mailto() {
  6. cat <<-EOT > $bindir/$pkg-mailto.sh
  7. #!/bin/bash
  8. export MOZILLA_FIVE_HOME="$libdir/$pkg-$ver"
  9. mailto="\$1"
  10. if [[ \$mailto == mailto:* ]]; then
  11. mailto=\${mailto#mailto:}
  12. fi
  13. if \$MOZILLA_FIVE_HOME/mozilla-xremote-client -a thunderbird 'ping()'; then
  14. exec \$MOZILLA_FIVE_HOME/mozilla-xremote-client -a thunderbird mailto\("\$mailto"\)
  15. else
  16. exec $bindir/thunderbird "mailto:\$mailto"
  17. fi
  18. EOT
  19. chmod +x $bindir/$pkg-mailto.sh
  20. }
  21. mnemosyne_thunderbird_prefs() {
  22. if pkginstalled firefox; then
  23. cat<<-EOT >> $libdir/${pkg}-${ver}/defaults/pref/all-thunderbird.js
  24. pref("network.protocol-handler.app.http", "firefox-openurl.sh");
  25. pref("network.protocol-handler.app.https", "firefox-openurl.sh");
  26. pref("network.protocol-handler.app.ftp", "firefox-openurl.sh");
  27. EOT
  28. fi
  29. }