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

#!/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
}