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:
parent
3ced5ffd10
commit
61f1c7c626
1 changed files with 5 additions and 7 deletions
|
@ -268,8 +268,7 @@ public class Main {
|
|||
|
||||
private void generateKobaltW(Path filePath) throws IOException {
|
||||
//
|
||||
// For kobaltw: try to generate it with the correct env shebang. If this fails,
|
||||
// we'll generate it without the env shebang
|
||||
// For kobaltw: try to generate it with the correct env shebang.
|
||||
//
|
||||
File envFile = new File("/bin/env");
|
||||
if (!envFile.exists()) {
|
||||
|
@ -278,10 +277,9 @@ public class Main {
|
|||
|
||||
String content = "";
|
||||
|
||||
if (envFile.exists()) {
|
||||
content = "#!" + envFile.getAbsolutePath() + " bash\n";
|
||||
}
|
||||
log(2, " Generating " + KOBALTW + (envFile.exists() ? " with shebang" : "") + ".");
|
||||
content = "#!" + envFile.getAbsolutePath() + " bash\n";
|
||||
|
||||
log(2, " Generating " + KOBALTW + " with shebang.");
|
||||
|
||||
content += "java -jar $(dirname $0)/kobalt/wrapper/kobalt-wrapper.jar $*\n";
|
||||
|
||||
|
@ -473,4 +471,4 @@ public class Main {
|
|||
return process.waitFor();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue