void-packages/srcpkgs/oracle-jdk/INSTALL

35 lines
858 B
Text
Raw Normal View History

2014-06-22 05:51:26 +00:00
#
# This script will install the actual plugin, advise the user to read the
# license for Chrome and to re-login to have environment variables set
# properly.
#
BUILD_DIR="./var/tmp/${PKGNAME}.build"
do_install() {
2014-06-22 05:51:26 +00:00
mkdir -p "$BUILD_DIR"
wget \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
--progress=bar:force \
-c -O $BUILD_DIR/jdk.tar.gz \
$ORACLE_JDK_URL
echo "$ORACLE_JDK_CHECKSUM $BUILD_DIR/jdk.tar.gz" | sha256sum -c || return 1
tar xf ${BUILD_DIR}/jdk.tar.gz || return 1
if [ -d usr/lib/jvm/jdk$ORACLE_JDK_LONG_VERSION ]; then
rm -rf usr/lib/jvm/jdk$ORACLE_JDK_LONG_VERSION
fi
mv jdk$ORACLE_JDK_LONG_VERSION usr/lib/jvm/jdk$ORACLE_JDK_LONG_VERSION || return 1
}
case "${ACTION}" in
post)
. usr/lib/jvm/oracle-jdk-vars.sh
do_install
RESULT=$?
2014-06-22 05:51:26 +00:00
rm -r $BUILD_DIR
[ $RESULT -ne 0 ] && exit $RESULT
2014-09-15 15:39:34 +00:00
;;
2014-06-22 05:51:26 +00:00
esac