diff --git a/dist/kobaltw b/dist/kobaltw index a8df4bb9..4f39dc35 100755 --- a/dist/kobaltw +++ b/dist/kobaltw @@ -1,2 +1,7 @@ #!/usr/bin/env sh -java -jar "`dirname "$0"`/../kobalt/wrapper/kobalt-wrapper.jar" $* \ No newline at end of file + +DIRNAME=`dirname $(readlink -f "$0")` +if [[ "$(uname)" == "CYGWIN"* ]]; then + DIRNAME=`cygpath -d "$DIRNAME"` +fi +java -jar "${DIRNAME}/../kobalt/wrapper/kobalt-wrapper.jar" $* \ No newline at end of file diff --git a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java index 931f8452..a9a30385 100644 --- a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java +++ b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java @@ -219,6 +219,20 @@ public class Main { log(2, " Couldn't find $VERSION_TEXT, overwriting the installed wrapper"); installWrapperFiles(version, wrapperVersion); } + + // + // Install the launcher(s) if not already found. + // + File kobaltw = new File(KOBALTW); + File kobaltwBat = new File(KOBALTW_BAT); + + if (!kobaltw.exists()) { + generateKobaltW(kobaltw.toPath()); + } + + if (!kobaltwBat.exists()) { + generateKobaltWBat(kobaltwBat.toPath()); + } } return kobaltJarFile;