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.

34 lines
762 B

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