Skip to content

Commit

Permalink
Merge pull request #423 from usmanovbf/curl_skip_if_exists
Browse files Browse the repository at this point in the history
Added options for curl to skip downloading of tbls if the newest file exists
  • Loading branch information
k1LoW authored Jan 26, 2023
2 parents 45335ba + 55339e8 commit bec0d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions use
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ download() {
echo "Unable to get tbls version." >&2
exit 1
}
rm -f "$TBLS_ARCHIVE"
curl -s -L -o "$TBLS_ARCHIVE" \
curl `if [ -f "$TBLS_ARCHIVE" ]; then echo -z "$TBLS_ARCHIVE"; fi` \ # Skip downloading if the newest file was downloaded before
-s -L -o "$TBLS_ARCHIVE" \
"${TBLS_RELEASES_URL}/download/${TBLS_VERSION}/tbls_${TBLS_VERSION}_${TBLS_GOOS}_${TBLS_ARCH}.${TBLS_EXT}"
}

Expand Down

0 comments on commit bec0d78

Please sign in to comment.