From ce4a1c3507873f694c72d1678ee8cbfe2fedf00c Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 14 Jul 2015 14:23:45 +0200 Subject: [PATCH] add oracle downlaod cookie by default --- lib/builder-targets.sh | 2 +- lib/builder-utils.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/builder-targets.sh b/lib/builder-targets.sh index 6afb0b9..53df44e 100644 --- a/lib/builder-targets.sh +++ b/lib/builder-targets.sh @@ -161,7 +161,7 @@ builder_retrieve() { mkdir -p ${DIST_CACHE_DIR}/$arch DL_DIST_FILE[$i]=${DIST_CACHE_DIR}/$arch/$basename - retrieve_file $downloader $src ${DL_DIST_FILE[$i]} + retrieve_file $downloader $src ${DL_DIST_FILE[$i]} if [ $? != 0 ] ; then echo " Warning: Failed to download file - try next URL" diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh index da37835..22fcd83 100644 --- a/lib/builder-utils.sh +++ b/lib/builder-utils.sh @@ -30,6 +30,7 @@ function retrieve_file() { local downloader=$1 local src=$2 local dst=$3 + local option=$4 # Check, if the URL is a file URL starting with file:// if [ -f $dst ] && [ -z ${DIST_FORCE_DOWNLOAD} ]; then @@ -40,7 +41,7 @@ function retrieve_file() { else rm -f $dst if [ "$downloader" = "wget" ]; then - wget --no-check-certificate --tries=1 -O $dst --timeout=5 -q --no-verbose "$src" + wget --no-check-certificate --header='Cookie: oraclelicense=accept-securebackup-cookie' --tries=1 -O $dst --timeout=5 -q --no-verbose "$src" if [ "$?" == "1" ] ; then rm $dst fi