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

Always generate the shebang line

This commit is contained in:
Sargun Vohra 2016-07-12 22:58:11 -04:00
parent 3ced5ffd10
commit 61f1c7c626

View file

@ -268,8 +268,7 @@ public class Main {
private void generateKobaltW(Path filePath) throws IOException { private void generateKobaltW(Path filePath) throws IOException {
// //
// For kobaltw: try to generate it with the correct env shebang. If this fails, // For kobaltw: try to generate it with the correct env shebang.
// we'll generate it without the env shebang
// //
File envFile = new File("/bin/env"); File envFile = new File("/bin/env");
if (!envFile.exists()) { if (!envFile.exists()) {
@ -278,10 +277,9 @@ public class Main {
String content = ""; String content = "";
if (envFile.exists()) { content = "#!" + envFile.getAbsolutePath() + " bash\n";
content = "#!" + envFile.getAbsolutePath() + " bash\n";
} log(2, " Generating " + KOBALTW + " with shebang.");
log(2, " Generating " + KOBALTW + (envFile.exists() ? " with shebang" : "") + ".");
content += "java -jar $(dirname $0)/kobalt/wrapper/kobalt-wrapper.jar $*\n"; content += "java -jar $(dirname $0)/kobalt/wrapper/kobalt-wrapper.jar $*\n";