Ignore:
Timestamp:
Dec 20, 2017, 2:59:50 PM (3 years ago)
Author:
mabarracus
Message:

Update to 9.0.1 x64 version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • oracle-java9-installer/trunk/fuentes/debian/oracle-java9-installer.postinst

    r2126 r6532  
    2020  ;;
    2121'amd64'  ) arch=amd64; dld=x64;
    22   SHA256SUM_TGZ="241ed401b3b5b9405deb30a1cd61d0a950d49e3d05d30e8ba61a0ad9cb978137" #must be modified for each release
     22  SHA256SUM_TGZ="2cdaf0ff92d0829b510edd883a4ac8322c02f2fc1beae95d048b6716076bc014" #must be modified for each release
    2323  ;;
    24 # arm*      )
    25 #  arch=arm
    26 #       if [ `uname -m` = "armv7l" ] || [ `uname -m` = "armv6l" ]; then
    27 #               if [ -x /usr/bin/readelf ] ; then
    28 #                       HARDFLOAT=`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`
    29 #                       if [ -z "$HARDFLOAT" ]; then
    30 #                               # Softfloat
    31 #                               echo "Oracle Java 8 only supports ARM v6/v7 hardfloat ABI."
    32 #                               #dld='arm-vfp-sflt'
    33 #                               #SHA256SUM_TGZ="5026a8f2eea8d350ea6ed7cfb8496b571ec9c1e43db82750a3ca8dc02569076e"
    34 #                       else
    35 #                               # Hardfloat
    36 #                               dld='arm-vfp-hflt'
    37 #                               SHA256SUM_TGZ="e550a8eb903ecb8e6a46b5a1efd3d87a0672084cf40315ed8a1b8208eeb17286" #must be modified for each release
    38 #                       fi
    39 #               fi
    40 #       else
    41 #               echo "Oracle JDK 8 only supports ARM v6/v7 hardfloat."
    42 #               arch=''
    43 #       fi
    44 #       ;;
    4524*         )
    4625    echo "Please report to author unsupported platform '`uname -m`'.";
     
    5029
    5130
    52 ########Variables
    53 
    54 #if [ ! $arch = "arm" ]; then
    55         JAVA_VERSION_MAJOR=9 #
    56         JAVA_VERSION_MINOR=125 #must be modified for each release
    57         #JAVA_VERSION_DATE="05_aug_2015" #must be modified for each release
    58         J_DIR=jdk-9 #must be modified for each release
    59         FILENAME=jdk-${JAVA_VERSION_MAJOR}-ea+${JAVA_VERSION_MINOR}_linux-${dld}_bin.tar.gz
    60         PARTNER_URL=http://www.java.net/download/java/jdk${JAVA_VERSION_MAJOR}/archive/${JAVA_VERSION_MINOR}/binaries/$FILENAME
    61         for JAVA_VERSION_OLD2 in `seq 48 124`; do #must be modified for each release
    62            FILENAMES_OLD2="jdk-${JAVA_VERSION_MAJOR}-ea-bin-b${JAVA_VERSION_OLD2}-linux*.tar.gz $FILENAMES_OLD2"
    63         done
    64        
    65         FILENAME=jdk-9-linux-${dld}.tar.gz
    66 
    67        
    68        
    69 #else
    70 #       JAVA_VERSION=8u33 #must be modified for each release jdk-8-linux-arm-vfp-hflt.tar.gz
    71 #       J_DIR=jdk1.8.0_33 #must be modified for each release
    72 #       FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
    73 #       PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u33-b05/$FILENAME #must be modified for each release
    74 #       for JAVA_VERSION_OLD1 in `seq 1 32`; do #must be modified for each release
    75 #               FILENAMES_OLD1="jdk-8u${JAVA_VERSION_OLD1}-linux-${dld}*.tar.gz $FILENAMES_OLD1 jdk-8-*.tar.gz"
    76 #       done
    77 #fi
     31
     32if [ ! $arch = "amd64" ]; then
     33    J_DIR=jdk-9 #must be modified for each release
     34    JAVA_VERSION_MAJOR=9 #
     35    JAVA_VERSION_MINOR=125 #must be modified for each release
     36    #FILENAME=jdk-${JAVA_VERSION_MAJOR}-ea+${JAVA_VERSION_MINOR}_linux-${dld}_bin.tar.gz
     37    FILENAME=jdk-9-linux-${dld}.tar.gz
     38else
     39    J_DIR=jdk-9.0.1
     40    JAVA_VERSION_MAJOR=9.0.1 #
     41    JAVA_VERSION_MINOR=11 #must be modified for each release
     42    FILENAME=jdk-9-linux-${dld}.tar.gz
     43fi
     44
    7845
    7946J_INSTALL_DIR=/usr/lib/jvm/java-9-oracle
     
    8552#without this, an error is displayed if the folder doesn't exist:
    8653mkdir -p /usr/lib/mozilla/plugins
    87 if [ $arch = "arm" ]; then
    88         #apparently this dir doesn't exist on some arm machines
    89         mkdir -p /usr/share/man/man1
    90 fi
    91 
    9254#############
    9355
     
    10365}
    10466
    105 fp_download_and_unpack() {
    106 
    107         cd /var/cache/oracle-jdk9-installer
    108 
    109         db_get oracle-java9-installer/local
    110         if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
    111 
    112                 echo "Installing from local file $RET/$FILENAME"
    113                 cp -f -p "$RET"/$FILENAME ${FILENAME}_TEMP
    114                 mv -f ${FILENAME}_TEMP $FILENAME
    115         else # no local file
    116 
    117                 # use apt proxy
    118                 APT_PROXIES=$(apt-config shell \
    119                 http_proxy Acquire::http::Proxy \
    120                 https_proxy Acquire::https::Proxy \
    121                 ftp_proxy Acquire::ftp::Proxy \
    122                 dl_direct Acquire::http::Proxy::download.oracle.com \
    123                 dl_direct Acquire::http::Proxy::*.java.net \
    124                 )
    125 
    126                 if [ -n "$APT_PROXIES" ]; then
    127                         eval export $APT_PROXIES
    128                 fi
    129 
    130     if [ "$dl_direct" = "DIRECT" ]; then
    131         unset http_proxy
    132         unset https_proxy
    133         unset ftp_proxy
    134     fi
    135 
    136                 # setting wget options
    137                 :> wgetrc
    138                 echo "noclobber = off" >> wgetrc
    139                 echo "dir_prefix = ." >> wgetrc
    140                 echo "dirstruct = off" >> wgetrc
    141                 echo "verbose = on" >> wgetrc
    142                 echo "progress = dot:mega" >> wgetrc
    143                 echo "tries = 5" >> wgetrc
    144 
    145                 # downloading jdk9
    146                 echo "Downloading Oracle Java 9..."
    147                 WGETRC=wgetrc wget --continue --no-check-certificate -O $FILENAME --header "Cookie: oraclelicense=a" $PARTNER_URL \
    148                         || fp_exit_with_error "download failed"
    149                 echo "Download done."
    150 
    151 
    152         fi # end if local file
    153 
    154         # Removing outdated cached downloads
    155         echo "Removing outdated cached downloads..."
    156         rm -vf $FILENAMES_OLD
    157         rm -vf $FILENAMES_OLD1
    158         rm -vf $FILENAMES_OLD2
    159         rm -vf $FILENAMES_OLD_N
    160         rm -vf $FILENAMES_OLD_NA
    161 
    162         # verify SHA256 checksum of (copied or downloaded) tarball
    163         rm -rf jdk*/
    164         echo "$SHA256SUM_TGZ  $FILENAME" | sha256sum -c > /dev/null 2>&1 \
    165                 || fp_exit_with_error "sha256sum mismatch $FILENAME"
    166 
    167         # unpacking and checking the plugin
    168         tar xzf $FILENAME || fp_exit_with_error "cannot unpack jdk9"
    169 }
    170 
    17167OLDDIR=/usr/lib/oracle-jdk9-installer-unpackdir
    17268NEWDIR=/var/cache/oracle-jdk9-installer
     
    17773}
    17874
    179 #fp_download_and_unpack
    180 # Lliurex -----------------------------------05/11/2013
    181 #Comentar descarga y copiar desde directorio
    182 #fp_download_and_unpack
    18375ORACLE_DIR=/var/cache/oracle-jdk9-installer
    184 #cp -f -p "$ORACLE_DIR"/$FILENAME ${FILENAME}_TEMP
    185 #mv -f ${FILENAME}_TEMP $FILENAME
    186 rm -f ${FILENAME}
    18776cd $ORACLE_DIR
    18877tar xzf $FILENAME || fp_exit_with_error "cannot unpack jdk9"
Note: See TracChangeset for help on using the changeset viewer.