Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SWF-2801 : Download SHA1 only if SHA1 or target file aren’t existing
  • Loading branch information
aheritier committed Dec 27, 2013
1 parent a3da5d1 commit 2bcffa7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions _functions_download.sh
Expand Up @@ -177,7 +177,9 @@ do_download_maven_artifact() {
#
local _sha1Url="${_artifactUrl}.sha1"
local _sha1File="${_artifactFile}.sha1"
do_curl "$_curlOptions" "$_sha1Url" "$_sha1File" "Artifact SHA1"
if [[ ! -e "$_artifactFile" ]] || [[ ! -e "$_sha1File" ]]; then
do_curl "$_curlOptions" "$_sha1Url" "$_sha1File" "Artifact SHA1"
fi

#
# Download the artifact
Expand Down Expand Up @@ -322,7 +324,9 @@ do_http_download_with_sha1() {
#
local _sha1Url="${_fileURL}.sha1"
local _sha1File="${_localPath}.sha1"
do_curl "$_curlOptions" "$_sha1Url" "$_sha1File" "File SHA1"
if [[ ! -e "$_localPath" ]] || [[ ! -e "$_sha1File" ]]; then
do_curl "$_curlOptions" "$_sha1Url" "$_sha1File" "File SHA1"
fi

#
# Download the file
Expand Down

0 comments on commit 2bcffa7

Please sign in to comment.