43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
|
#
|
||
|
# 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"
|
||
|
|
||
|
case "${ACTION}" in
|
||
|
post)
|
||
|
. usr/share/java/oracle-jdk-vars.sh
|
||
|
|
||
|
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 || exit 1
|
||
|
tar xf ${BUILD_DIR}/jdk.tar.gz || exit 1
|
||
|
rm -rf /usr/java/$PKGNAME 2> /dev/null
|
||
|
mv jdk$ORACLE_JDK_LONG_VERSION /usr/share/java/$PKGNAME || exit 1
|
||
|
rm -r $BUILD_DIR
|
||
|
cat << _EOF
|
||
|
=====================================================================
|
||
|
|
||
|
- The Oracle JDK package is licensed software.
|
||
|
|
||
|
You MUST read and agree to the license stored in
|
||
|
/usr/share/licenses/oracle-jdk/license.html
|
||
|
before using it.
|
||
|
|
||
|
- Please re-login to update PATH and JAVA_HOME or re-source
|
||
|
/etc/profile:
|
||
|
|
||
|
$ source /etc/profile
|
||
|
|
||
|
=====================================================================
|
||
|
_EOF
|
||
|
;;
|
||
|
esac
|
||
|
|