Fix #124454: Allow BF_DIST_BIN to be a symlink

In `blender-launcher` on linux, the `$0` could be assigned to
a symlink instead of an actual directory, which may cause infinite
chaining of the command which ultimately gives an arguent string that's
way too long. This fix prevents that by using `readlink -f` first.

This fix was implemented by @Joel-Schumacher

Ref: !124533
This commit is contained in:
YimingWu
2024-07-11 21:30:16 +08:00
committed by Campbell Barton
parent a721c81668
commit 0f1f0d92bc

View File

@@ -1,5 +1,5 @@
#!/bin/sh
BF_DIST_BIN=$(dirname "$0")
BF_DIST_BIN=$(dirname $(readlink -f "$0"))
BF_PROGRAM="blender"
# Add own lib folder first, because Steam or other environments may set an