mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Don't generate kobaltw if it's already there.
This commit is contained in:
parent
c6009a6a1e
commit
fe1c8a3545
2 changed files with 6 additions and 8 deletions
|
@ -166,23 +166,21 @@ public class Main {
|
|||
for (String file : FILES) {
|
||||
Path to = Paths.get(new File(".").getAbsolutePath(), file);
|
||||
|
||||
if (file.equals(KOBALTW)) {
|
||||
generateKobaltW(to);
|
||||
}
|
||||
|
||||
if (Files.exists(to)) {
|
||||
log(2, to + " already exists, not overwriting it");
|
||||
log(2, " $to already exists, not overwriting it");
|
||||
continue;
|
||||
} else {
|
||||
} else if (file.equals(KOBALTW)) {
|
||||
generateKobaltW(to);
|
||||
} else {
|
||||
Path from = Paths.get(zipOutputDir, file);
|
||||
try {
|
||||
if (isWindows() && to.toFile().exists()) {
|
||||
log(2, "Windows detected, not overwriting " + to);
|
||||
log(2, " Windows detected, not overwriting " + to);
|
||||
} else {
|
||||
Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
log(1, "Couldn't copy " + from + " to " + to + ": " + ex.getMessage());
|
||||
log(1, " Couldn't copy " + from + " to " + to + ": " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue