2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-26 00:37:10 -07:00

Minor cleanup

This commit is contained in:
Geert Bevin 2023-05-11 21:53:41 -04:00
parent 0cf76977cc
commit 91bc4d271e

View file

@ -415,8 +415,9 @@ public class Wrapper {
var distribution_file = new File(DISTRIBUTIONS_DIR, bldFileName(version)); var distribution_file = new File(DISTRIBUTIONS_DIR, bldFileName(version));
var distribution_sources_file = new File(DISTRIBUTIONS_DIR, bldSourcesFileName(version)); var distribution_sources_file = new File(DISTRIBUTIONS_DIR, bldSourcesFileName(version));
if (distribution_file.exists()) { // if this is a snapshot and the distribution file exists,
if (is_snapshot) { // ensure that it's the latest by comparing hashes
if (is_snapshot && distribution_file.exists()) {
var download_md5 = readString(version, new URL(downloadUrl(version, bldFileName(download_version)) + ".md5")); var download_md5 = readString(version, new URL(downloadUrl(version, bldFileName(download_version)) + ".md5"));
try { try {
var digest = MessageDigest.getInstance("MD5"); var digest = MessageDigest.getInstance("MD5");
@ -428,8 +429,8 @@ public class Wrapper {
} catch (NoSuchAlgorithmException ignore) { } catch (NoSuchAlgorithmException ignore) {
} }
} }
}
// download distribution jars if necessary
if (!distribution_file.exists()) { if (!distribution_file.exists()) {
downloadDistribution(distribution_file, downloadUrl(version, bldFileName(download_version))); downloadDistribution(distribution_file, downloadUrl(version, bldFileName(download_version)));
} }