File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ if [[ -n "$1" ]]; then
2929 fi
3030fi
3131
32- # set download extention
32+ # set download extension
3333if [[ -n " $2 " ]]; then
3434 if [[ " $2 " == " tar" ]]; then
3535 EXT=" tar.gz"
@@ -57,15 +57,15 @@ if [[ -z "$DOWNLOAD_URL4" ]]; then
5757 exit 1
5858fi
5959# set download file name
60- JAVA_INSTALL=$( echo $DOWNLOAD_URL4 | cut -d " / " -f 8 )
60+ JAVA_INSTALL=$( basename $DOWNLOAD_URL4 )
6161
6262if [[ " $EXT " == " rpm" ]]; then
6363
6464 # download java
6565 echo -e " \n\e[32mDownloading\e[0m: $DOWNLOAD_URL4 "
6666 while true ;
6767 do echo -n . ; sleep 1; done &
68- cd /tmp; wget -- no-cookies --no-check-certificate --header " Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 > /dev/null 2>&1
68+ cd /tmp; wget -q -- no-cookies --no-check-certificate --header " Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 -O $JAVA_INSTALL > /dev/null 2>&1
6969 kill $! ; trap ' kill $!' SIGTERM;
7070 # install rpm
7171 echo -e " \n\e[32mInstalling\e[0m: $JAVA_INSTALL \r"
@@ -100,7 +100,7 @@ elif [[ "$EXT" == "tar" || "$EXT" == "tar.gz" ]]; then
100100 echo -e " \n\e[32mDownloading\e[0m: $DOWNLOAD_URL4 "
101101 while true ;
102102 do echo -n . ; sleep 1; done &
103- cd /opt; wget --no-cookies --no-check-certificate --header " Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 > /dev/null 2>&1
103+ cd /opt; wget --no-cookies --no-check-certificate --header " Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 -O $JAVA_INSTALL > /dev/null 2>&1
104104 kill $! ; trap ' kill $!' SIGTERM;
105105 # extract the tar
106106 echo -e " \n\e[32mExtracting\e[0m: $JAVA_INSTALL \r"
You can’t perform that action at this time.
0 commit comments