@@ -60,27 +60,28 @@ download_zip() {
60
60
return
61
61
fi
62
62
63
- echo " @@ Info: Downloading '$LOCATION ' to '$WORKDIR /$ZIPFILE '."
63
+ echo " @@ Info: Downloading $ZIPFILE from '$LOCATION ' to '$WORKDIR /$ZIPFILE '."
64
64
65
65
local iurl=" $LOCATION "
66
66
if [ " ` echo $iurl | grep -c ' https://github.com.*/latest$' ` " = " 1" ]; then
67
67
echo " @@ Info: The location URL matches regex 'https://github.com.*/latest$'. About to convert to direct location."
68
- local tempfile=" $( mktemp -u) .$( basename $0 ) .$SECONDS .$PPID .$RANDOM "
69
- echo " @@ Info: Calling 'curl $curl_parms -fL $LOCATION -o $tempfile ' to find location of latest version."
70
- curl $curl_parms -fL $LOCATION -o $tempfile
71
- LOCATION=https://github.com/$( cat $tempfile | grep " releases/download" | awk ' { split($0,a,/href="/); print a[2]}' | cut -d\" -f 1)
72
- rm -f $tempfile
68
+ if [ " $DOWNLOAD_VAR_NAME " == " DOWNLOAD_WDT" ]; then
69
+ LOCATION=https://github.com/oracle/weblogic-deploy-tooling/releases/latest/download/
70
+ fi
71
+ if [ " $DOWNLOAD_VAR_NAME " == " DOWNLOAD_WIT" ]; then
72
+ LOCATION=https://github.com/oracle/weblogic-image-tool/releases/latest/download/
73
+ fi
73
74
echo " @@ Info: The location URL matched regex 'https://github.com.*/latest$' so it was converted to '$LOCATION '"
74
75
echo " @@ Info: Now downloading '$LOCATION ' to '$WORKDIR /$ZIPFILE '."
75
76
fi
76
77
77
78
if [ ! " $dry_run " = " true" ]; then
78
79
rm -f $ZIPFILE
79
- echo " @@ Info: Calling 'curl $curl_parms -fL $LOCATION -o $ZIPFILE '"
80
- curl $curl_parms -fL $LOCATION -o $ZIPFILE
80
+ echo " @@ Info: Calling 'curl $curl_parms -fL $LOCATION / $ZIPFILE -o $ZIPFILE '"
81
+ curl $curl_parms -fL $LOCATION / $ZIPFILE -o $ZIPFILE
81
82
else
82
83
echo " dryrun:rm -f $ZIPFILE "
83
- echo " dryrun:curl $curl_parms -fL $LOCATION -o $ZIPFILE "
84
+ echo " dryrun:curl $curl_parms -fL $LOCATION / $ZIPFILE -o $ZIPFILE "
84
85
fi
85
86
}
86
87
0 commit comments