Skip to content

Commit 20af4a3

Browse files
Correct symlinks resolving for *nix systems
1 parent 50e3d90 commit 20af4a3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

build.gradle

+9-5
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,10 @@ task bundle(dependsOn: jarPatch,
324324
def launchFile = new File(bundleOutput, "bin/launch")
325325
def launchBatFile = new File(bundleOutput, "bin/launch.bat")
326326

327+
def isBat = launchBatFile.exists()
328+
327329
def cubacliFile = new File(bundleOutput, "cuba-cli")
328-
if (launchBatFile.exists()) {
330+
if (isBat) {
329331
cubacliFile = new File(bundleOutput, "cuba-cli.bat")
330332
}
331333

@@ -355,10 +357,12 @@ task bundle(dependsOn: jarPatch,
355357
}
356358
}
357359

358-
if (osName.contains('mac')
359-
|| project.hasProperty('targetOsPlatform') && project['targetOsPlatform'] == 'macos') {
360-
def cubacliMacOsFile = new File(project.rootDir, "etc/cuba-cli-macos")
361-
cubacliFile.text = cubacliMacOsFile.text
360+
if (!isBat && (osName.contains('nux')
361+
|| osName.contains('mac')
362+
|| project.hasProperty('targetOsPlatform')
363+
&& (project['targetOsPlatform'] == 'macos' || project['targetOsPlatform'] == 'linux'))) {
364+
def cubacliUnixFile = new File(project.rootDir, "etc/cuba-cli-unix")
365+
cubacliFile.text = cubacliUnixFile.text
362366
}
363367
}
364368
}

etc/cuba-cli-macos etc/cuba-cli-unix

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
JLINK_VM_OPTIONS=
33
get_script_dir () {
44
SOURCE="${BASH_SOURCE[0]}"

0 commit comments

Comments
 (0)