add oracle downlaod cookie by default

This commit is contained in:
Mario Fetka 2015-07-14 14:23:45 +02:00
parent ba5d7927c0
commit ce4a1c3507
2 changed files with 3 additions and 2 deletions

View File

@ -161,7 +161,7 @@ builder_retrieve() {
mkdir -p ${DIST_CACHE_DIR}/$arch mkdir -p ${DIST_CACHE_DIR}/$arch
DL_DIST_FILE[$i]=${DIST_CACHE_DIR}/$arch/$basename 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 if [ $? != 0 ] ; then
echo " Warning: Failed to download file - try next URL" echo " Warning: Failed to download file - try next URL"

View File

@ -30,6 +30,7 @@ function retrieve_file() {
local downloader=$1 local downloader=$1
local src=$2 local src=$2
local dst=$3 local dst=$3
local option=$4
# Check, if the URL is a file URL starting with file:// # Check, if the URL is a file URL starting with file://
if [ -f $dst ] && [ -z ${DIST_FORCE_DOWNLOAD} ]; then if [ -f $dst ] && [ -z ${DIST_FORCE_DOWNLOAD} ]; then
@ -40,7 +41,7 @@ function retrieve_file() {
else else
rm -f $dst rm -f $dst
if [ "$downloader" = "wget" ]; then 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 if [ "$?" == "1" ] ; then
rm $dst rm $dst
fi fi