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

Skip to content

Commit 819fb7d

Browse files
committed
Changing sudo to required and adding validations.
1 parent 4a564d9 commit 819fb7d

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: false
1+
sudo: required
22
language: python
33

44
addons:

.travis/download.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/bash
22
set -e
33

4+
if [ "$ORACLE_OTN_USER" == "" ] || [ "$ORACLE_OTN_PASSWORD" == "" ]; then
5+
echo "Error: Oracle OTN username/password not specified."
6+
exit 1
7+
fi
8+
49
PRODUCT=""
510

611
# Call the casperjs script to return the download url.
@@ -21,7 +26,7 @@ while getopts "p:" OPTNAME; do
2126
esac
2227
done
2328

24-
if [ "$PRODUCT" = "se12c" ]; then
29+
if [ "$PRODUCT" == "se12c" ]; then
2530
agreementUrl="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
2631
downloadUrl="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_se2_1of2.zip"
2732
outputFile=linuxamd64_12102_database_se2_1of2.zip
@@ -33,7 +38,7 @@ if [ "$PRODUCT" = "se12c" ]; then
3338
exit 0
3439
fi
3540

36-
if [ "$PRODUCT" = "ee12c" ]; then
41+
if [ "$PRODUCT" == "ee12c" ]; then
3742
agreementUrl="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"
3843
downloadUrl="http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_1of2.zip"
3944
outputFile=linuxamd64_12102_database_1of2.zip
@@ -45,21 +50,21 @@ if [ "$PRODUCT" = "ee12c" ]; then
4550
exit 0
4651
fi
4752

48-
if [ "$PRODUCT" = "xe11g" ]; then
53+
if [ "$PRODUCT" == "xe11g" ]; then
4954
agreementUrl="http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html"
5055
downloadUrl="https://edelivery.oracle.com/akam/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip"
5156
outputFile=oracle-xe-11.2.0-1.0.x86_64.rpm.zip
5257
downloadFile $agreementUrl $downloadUrl $outputFile
5358
exit 0
5459
fi
5560

56-
if [ "$PRODUCT" = "sqlcl" ]; then
61+
if [ "$PRODUCT" == "sqlcl" ]; then
5762
agreementUrl="http://www.oracle.com/technetwork/developer-tools/sqlcl/downloads/index.html"
5863
downloadUrl="http://download.oracle.com/otn/java/sqldeveloper/sqlcl-4.2.0.16.355.0402-no-jre.zip"
5964
outputFile=sqlcl-4.2.0.16.355.0402-no-jre.zip
6065
downloadFile $agreementUrl $downloadUrl $outputFile
6166
exit 0
6267
fi
6368

64-
echo "Invalid product: $PRODUCT"
69+
echo "Error: invalid product: $PRODUCT"
6570
exit 1

0 commit comments

Comments
 (0)