Tue, 12 Nov 2024 17:11:55 +0100
fix that --update overwrites .mk files - fixes #505
src/main/java/de/unixwork/uwproj/Main.java | file | annotate | diff | comparison | revisions |
--- a/src/main/java/de/unixwork/uwproj/Main.java Tue Nov 12 17:00:51 2024 +0100 +++ b/src/main/java/de/unixwork/uwproj/Main.java Tue Nov 12 17:11:55 2024 +0100 @@ -91,7 +91,9 @@ System.err.printf(" (default: %s)\n", IN_FILE_DEFAULT); System.err.println(" -t --template <file> Path to the velocity template"); System.err.printf(" (default: %s)\n", TPL_FILE_DEFAULT); - System.err.println(" --update Same as --init, but overwrites existing files"); + System.err.println(" --update Updates configure template and toolchain detection"); + System.err.println(" in directory 'make' to current version."); + System.err.println(" You might need to update project.xml manually."); } private static void extract(Path path) { @@ -104,7 +106,9 @@ } private static void init(boolean force) { - final var files = new String[]{ + final var files = force ? new String[] { + "configure.vm", "toolchain.sh", "uwproj.xsd" + } : new String[]{ "cc.mk", "gcc.mk", "clang.mk", "suncc.mk", "configure.vm", "toolchain.sh", "uwproj.xsd" };