diff options
Diffstat (limited to 'community/java-oracle/jre.install')
-rw-r--r-- | community/java-oracle/jre.install | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/community/java-oracle/jre.install b/community/java-oracle/jre.install index 111da3c2a..573f5f836 100644 --- a/community/java-oracle/jre.install +++ b/community/java-oracle/jre.install @@ -1,20 +1,35 @@ post_install() { - echo "The jre package is licensed software." - echo "You MUST read and agree to the license stored in" - echo "/opt/java/jre/LICENSE before using it." - if [ -f /etc/mailcap ] ; then - sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap - fi - echo 'application/x-java-jnlp-file;/opt/java/jre/bin/javaws %s' >>/etc/mailcap + update-desktop-database -q + xdg-icon-resource forceupdate + update-mime-database usr/share/mime &> /dev/null + + echo "The jre package is licensed software." + echo "You MUST read and agree to the license stored in" + echo "/usr/share/licenses/jre/LICENSE before using it." + + if [ -f /etc/mailcap ] ; then + sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap + fi + echo 'application/x-java-jnlp-file;/opt/java/jre/bin/javaws %s' >>/etc/mailcap echo 'Please relogin to include jre in your PATH.' } +post_upgrade() { + update-desktop-database -q + xdg-icon-resource forceupdate + update-mime-database usr/share/mime &> /dev/null +} + post_remove() { - mailcap=$(grep -v 'application/x-java-jnlp-file' /etc/mailcap) - if [ "$mailcap" != "" ] ; then - sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap - else - rm /etc/mailcap - fi + update-desktop-database -q + xdg-icon-resource forceupdate + update-mime-database usr/share/mime &> /dev/null + + mailcap=$(grep -v 'application/x-java-jnlp-file' /etc/mailcap) + if [ "$mailcap" != "" ] ; then + sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap + else + rm /etc/mailcap + fi } |