1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Only overwrite kobaltw for new versions.

This commit is contained in:
Cedric Beust 2015-11-15 16:47:31 -08:00
parent 087cb81e08
commit 81eaf51367

View file

@ -112,7 +112,8 @@ public class Main {
private Path installJarFile() throws IOException {
Properties properties = maybeCreateProperties();
initWrapperFile(properties.getProperty(PROPERTY_VERSION));
String version = properties.getProperty(PROPERTY_VERSION);
initWrapperFile(version);
String wrapperVersion = getWrapperVersion();
log(2, "Wrapper version: " + wrapperVersion);
@ -147,6 +148,7 @@ public class Main {
//
// Copy the wrapper files in the current kobalt/wrapper directory
//
if (! wrapperVersion.equals(version)) {
log(2, "Copying the wrapper files");
for (String file : FILES) {
Path from = Paths.get(zipOutputDir, file);
@ -167,6 +169,7 @@ public class Main {
log(1, "Couldn't make " + KOBALTW + " executable");
}
}
}
return kobaltJarFile;
}