Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 180891f

Browse files
committed
Changes on download tool.
1 parent f30dc44 commit 180891f

3 files changed

Lines changed: 25 additions & 33 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ env:
2424
# Target Branch and Directory for Deployment of Docs
2525
- PAGES_TARGET_BRANCH="gh-pages"
2626
- PAGES_VERSION_BASE="version3"
27-
- SQLCL_FILE=sqlcl-4.2.0.16.355.0402-no-jre.zip
2827
- SQLCLI=$HOME/.cache/sqlcl/bin/sql
2928

3029
addons:

.travis/download.sh

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#!/bin/bash
2+
set -e
23

34
PRODUCT=""
4-
AGREEMENT_URL=""
5-
DOWNLOAD_URL=""
6-
OUTPUT_FILE=""
75

86
# Call the casperjs script to return the download url.
97
# Then download the file using curl.
108
downloadFile() {
11-
downloadUrl=$(exec casperjs download.js $ORACLE_OTN_USER $ORACLE_OTN_PASSWORD $AGREEMENT_URL $DOWNLOAD_URL)
12-
#echo "DownloadURL: $downloadUrl"
13-
curl $downloadUrl -o $OUTPUT_FILE
9+
downloadUrl=$(exec casperjs download.js $ORACLE_OTN_USER $ORACLE_OTN_PASSWORD $1 $2)
10+
echo "DownloadURL: $downloadUrl"
11+
curl -O $downloadUrl
1412
}
1513

1614
#############################
@@ -24,42 +22,36 @@ while getopts "p:" OPTNAME; do
2422
done
2523

2624
if [ "$PRODUCT" = "se12c" ]; then
27-
AGREEMENT_URL="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
28-
DOWNLOAD_URL="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_se2_1of2.zip"
29-
OUTPUT_FILE="linuxamd64_12102_database_se2_1of2.zip"
30-
downloadFile
31-
AGREEMENT_URL="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
32-
DOWNLOAD_URL="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_se2_2of2.zip"
33-
OUTPUT_FILE="linuxamd64_12102_database_se2_2of2.zip"
34-
downloadFile
25+
agreementUrl="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
26+
downloadUrl="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_se2_1of2.zip"
27+
downloadFile $agreementUrl $downloadUrl
28+
agreementUrl="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
29+
downloadUrl="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_se2_2of2.zip"
30+
downloadFile $agreementUrl $downloadUrl
3531
exit 0
3632
fi
3733

3834
if [ "$PRODUCT" = "ee12c" ]; then
39-
AGREEMENT_URL="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
40-
DOWNLOAD_URL="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_1of2.zip"
41-
OUTPUT_FILE="linuxamd64_12102_database_1of2.zip"
42-
downloadFile
43-
AGREEMENT_URL="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
35+
agreementUrl="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
36+
downloadUrl="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_1of2.zip"
37+
downloadFile $agreementUrl $downloadUrl
38+
agreementUrl="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
4439
DOWNLOAD_URL="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_2of2.zip"
45-
OUTPUT_FILE="linuxamd64_12102_database_2of2.zip"
46-
downloadFile
40+
downloadFile $agreementUrl $downloadUrl
4741
exit 0
4842
fi
4943

5044
if [ "$PRODUCT" = "xe11g" ]; then
51-
AGREEMENT_URL="http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html"
52-
DOWNLOAD_URL="https://edelivery.oracle.com/akam/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip"
53-
OUTPUT_FILE="oracle-xe-11.2.0-1.0.x86_64.rpm.zip"
54-
downloadFile
45+
agreementUrl="http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html"
46+
downloadUrl="https://edelivery.oracle.com/akam/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip"
47+
downloadFile $agreementUrl $downloadUrl
5548
exit 0
5649
fi
5750

5851
if [ "$PRODUCT" = "sqlcl" ]; then
59-
AGREEMENT_URL="http://www.oracle.com/technetwork/developer-tools/sqlcl/downloads/index.html"
60-
DOWNLOAD_URL="http://download.oracle.com/otn/java/sqldeveloper/sqlcl-4.2.0.16.355.0402-no-jre.zip"
61-
OUTPUT_FILE="sqlcl-4.2.0.16.355.0402-no-jre.zip"
62-
downloadFile
52+
agreementUrl="http://www.oracle.com/technetwork/developer-tools/sqlcl/downloads/index.html"
53+
downloadUrl="http://download.oracle.com/otn/java/sqldeveloper/sqlcl-4.2.0.16.355.0402-no-jre.zip"
54+
downloadFile $agreementUrl $downloadUrl
6355
exit 0
6456
fi
6557

.travis/download_sqlcl.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ set -e
44
cd .travis
55
if [ ! -d $HOME/.cache/sqlcl ]; then
66
sh download.sh -p sqlcl
7-
unzip -q $SQLCL_FILE
8-
bash mv sqlcl $HOME/.cache
9-
rm -f $SQLCL_FILE
7+
ls -la
8+
unzip -q sqlcl-4.2.0.16.355.0402-no-jre.zip
9+
rm -f sqlcl-4.2.0.16.355.0402-no-jre.zip
10+
bash mv sqlcl $HOME/.cache/
1011
fi;

0 commit comments

Comments
 (0)