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

Merge pull request #349 from ethauvin/master

Properly handle symlink
This commit is contained in:
Cedric Beust 2017-03-24 20:55:31 -07:00 committed by GitHub
commit 913360c504
2 changed files with 20 additions and 1 deletions

7
dist/kobaltw vendored
View file

@ -1,2 +1,7 @@
#!/usr/bin/env sh
java -jar "`dirname "$0"`/../kobalt/wrapper/kobalt-wrapper.jar" $*
DIRNAME=`dirname $(readlink -f "$0")`
if [[ "$(uname)" == "CYGWIN"* ]]; then
DIRNAME=`cygpath -d "$DIRNAME"`
fi
java -jar "${DIRNAME}/../kobalt/wrapper/kobalt-wrapper.jar" $*

View file

@ -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;