Skip to content

Commit a391533

Browse files
feat: cataclysm TLG support [macata #97]
1 parent 41b648b commit a391533

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/main/resources/osx_launcher_wrapper.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ else
2020
export ${K_LIBRARY_PATH}=. ${K_FRAMEWORK_PATH}=.
2121
fi
2222

23-
# check if 'cataclysm-tiles' or 'cataclysm-bn-tiles' exists, and run the appropriate one
24-
if [[ -f ./cataclysm-tiles ]]; then
25-
EXECUTABLE="./cataclysm-tiles"
26-
elif [[ -f ./cataclysm-bn-tiles ]]; then
27-
EXECUTABLE="./cataclysm-bn-tiles"
28-
else
23+
# find the first matching executable that starts with "cataclysm-" and is executable
24+
for candidate in ./cataclysm-*; do
25+
if [[ -x "$candidate" && ! -d "$candidate" ]]; then
26+
EXECUTABLE="$candidate"
27+
break
28+
fi
29+
done
30+
31+
if [[ -z "$EXECUTABLE" ]]; then
2932
echo "No valid executable found!"
3033
exit 1
3134
fi

0 commit comments

Comments
 (0)