Skip to content

Commit

Permalink
Update install_java.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
JustOneMoreBlock authored Jan 28, 2017
1 parent 721c53e commit e008669
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [[ -n "$1" ]]; then
fi
fi

# set download extention
# set download extension
if [[ -n "$2" ]]; then
if [[ "$2" == "tar" ]]; then
EXT="tar.gz"
Expand Down Expand Up @@ -57,15 +57,15 @@ if [[ -z "$DOWNLOAD_URL4" ]]; then
exit 1
fi
# set download file name
JAVA_INSTALL=$(echo $DOWNLOAD_URL4|cut -d "/" -f 8)
JAVA_INSTALL=$(basename $DOWNLOAD_URL4)

if [[ "$EXT" == "rpm" ]]; then

# download java
echo -e "\n\e[32mDownloading\e[0m: $DOWNLOAD_URL4"
while true;
do echo -n .;sleep 1;done &
cd /tmp; wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 > /dev/null 2>&1
cd /tmp; wget -q --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 -O $JAVA_INSTALL > /dev/null 2>&1
kill $!; trap 'kill $!' SIGTERM;
# install rpm
echo -e "\n\e[32mInstalling\e[0m: $JAVA_INSTALL\r"
Expand Down Expand Up @@ -100,7 +100,7 @@ elif [[ "$EXT" == "tar" || "$EXT" == "tar.gz" ]]; then
echo -e "\n\e[32mDownloading\e[0m: $DOWNLOAD_URL4"
while true;
do echo -n .;sleep 1;done &
cd /opt; wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 > /dev/null 2>&1
cd /opt; wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" $DOWNLOAD_URL4 -O $JAVA_INSTALL > /dev/null 2>&1
kill $!; trap 'kill $!' SIGTERM;
# extract the tar
echo -e "\n\e[32mExtracting\e[0m: $JAVA_INSTALL\r"
Expand Down

0 comments on commit e008669

Please sign in to comment.