summaryrefslogtreecommitdiffstats
path: root/abs/core/java-sun/jre.install
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2010-11-30 01:52:49 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2010-11-30 01:52:49 (GMT)
commit1c1c1f68c8b600d80f347c07c7a18de1e9e7ddcf (patch)
tree4b0281dffa0bb7d1770cb4654646ce5b2c6eb988 /abs/core/java-sun/jre.install
parentf8711d59a7725b76e11fe3e963fb0d94a4e68184 (diff)
downloadlinhes_pkgbuild-1c1c1f68c8b600d80f347c07c7a18de1e9e7ddcf.zip
linhes_pkgbuild-1c1c1f68c8b600d80f347c07c7a18de1e9e7ddcf.tar.gz
linhes_pkgbuild-1c1c1f68c8b600d80f347c07c7a18de1e9e7ddcf.tar.bz2
java-sun: (jdk and jre) upgrade
Diffstat (limited to 'abs/core/java-sun/jre.install')
-rw-r--r--abs/core/java-sun/jre.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/abs/core/java-sun/jre.install b/abs/core/java-sun/jre.install
new file mode 100644
index 0000000..7dfc547
--- /dev/null
+++ b/abs/core/java-sun/jre.install
@@ -0,0 +1,24 @@
+post_upgrade() {
+ post_install $1
+}
+
+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
+
+ echo 'Please relogin to include jre in your PATH.'
+}
+
+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
+}