|
1 | 1 | #!/bin/bash
|
2 |
| -# Copyright (c) 2019, 2021, Oracle and/or its affiliates. |
| 2 | +# Copyright (c) 2019, 2022, Oracle and/or its affiliates. |
3 | 3 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
|
4 | 4 |
|
5 | 5 | #
|
@@ -73,21 +73,33 @@ download_zip() {
|
73 | 73 | fi
|
74 | 74 | echo "@@ Info: The location URL matched regex 'https://github.com.*/latest$' so it was converted to '$LOCATION'"
|
75 | 75 | echo "@@ Info: Now downloading '$LOCATION' to '$WORKDIR/$ZIPFILE'."
|
76 |
| - fi |
77 | 76 |
|
78 |
| - if [ ! "$dry_run" = "true" ]; then |
79 |
| - rm -f $ZIPFILE |
80 |
| - echo "@@ Info: Calling 'curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE'" |
81 |
| - curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE |
| 77 | + if [ ! "$dry_run" = "true" ]; then |
| 78 | + rm -f $ZIPFILE |
| 79 | + echo "@@ Info: Calling 'curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE'" |
| 80 | + curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE |
| 81 | + else |
| 82 | + echo "dryrun:rm -f $ZIPFILE" |
| 83 | + echo "dryrun:curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE" |
| 84 | + fi |
82 | 85 | else
|
83 |
| - echo "dryrun:rm -f $ZIPFILE" |
84 |
| - echo "dryrun:curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE" |
| 86 | + echo "@@ Info: The location URL does not match regex 'https://github.com.*/latest$' " |
| 87 | + echo "@@ Info: Downloading from custom URL '$LOCATION' to '$WORKDIR/$ZIPFILE' " |
| 88 | + if [ ! "$dry_run" = "true" ]; then |
| 89 | + rm -f $ZIPFILE |
| 90 | + echo "@@ Info: Calling 'curl $curl_parms -fL $LOCATION -o $ZIPFILE'" |
| 91 | + curl $curl_parms -fL $LOCATION -o $ZIPFILE |
| 92 | + else |
| 93 | + echo "dryrun:rm -f $ZIPFILE" |
| 94 | + echo "dryrun:curl $curl_parms -fL $LOCATION -o $ZIPFILE" |
| 95 | + fi |
85 | 96 | fi
|
| 97 | + |
86 | 98 | }
|
87 | 99 |
|
88 | 100 | if [ "$dry_run" = "true" ]; then
|
89 | 101 | echo "dryrun:#!/bin/bash"
|
90 |
| - echo "dryrun:# Copyright (c) 2019, 2021, Oracle and/or its affiliates." |
| 102 | + echo "dryrun:# Copyright (c) 2019, 2022, Oracle and/or its affiliates." |
91 | 103 | echo "dryrun:# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl."
|
92 | 104 | echo "dryrun:"
|
93 | 105 | echo "dryrun:set -eux"
|
|
0 commit comments