2014-06-22 07:20:29 +00:00
|
|
|
#
|
|
|
|
# This script will install the actual plugin, advise the user to read the
|
2015-02-19 23:18:09 +00:00
|
|
|
# license for Oracle JRE and to re-login to have environment variables set
|
2014-06-22 07:20:29 +00:00
|
|
|
# properly.
|
|
|
|
#
|
|
|
|
|
|
|
|
BUILD_DIR="./var/tmp/${PKGNAME}.build"
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
mkdir -p "$BUILD_DIR"
|
|
|
|
wget \
|
|
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
|
|
--progress=bar:force \
|
|
|
|
-c -O $BUILD_DIR/jre.tar.gz \
|
|
|
|
$ORACLE_JRE_URL
|
|
|
|
echo "$ORACLE_JRE_CHECKSUM $BUILD_DIR/jre.tar.gz" | sha256sum -c || return 1
|
|
|
|
tar xf ${BUILD_DIR}/jre.tar.gz || return 1
|
|
|
|
|
2014-09-01 21:16:39 +00:00
|
|
|
if [ -d usr/lib/jvm/jre$ORACLE_JRE_LONG_VERSION ]; then
|
|
|
|
rm -rf usr/lib/jvm/jre$ORACLE_JRE_LONG_VERSION
|
2014-06-22 07:20:29 +00:00
|
|
|
fi
|
2014-09-01 21:16:39 +00:00
|
|
|
mv jre$ORACLE_JRE_LONG_VERSION usr/lib/jvm/jre$ORACLE_JRE_LONG_VERSION || return 1
|
2014-06-22 07:20:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case "${ACTION}" in
|
|
|
|
post)
|
2014-09-01 21:16:39 +00:00
|
|
|
. usr/lib/jvm/oracle-jre-vars.sh
|
2014-06-22 07:20:29 +00:00
|
|
|
do_install
|
|
|
|
RESULT=$?
|
|
|
|
rm -r $BUILD_DIR
|
|
|
|
[ $RESULT -ne 0 ] && exit $RESULT
|
2014-09-15 15:35:07 +00:00
|
|
|
;;
|
2014-06-22 07:20:29 +00:00
|
|
|
esac
|
|
|
|
|