Support passing game executable as arg on macOS in run_bepinex.sh

This commit is contained in:
ghorsington committed 2020-07-11 22:23:07 +03:00
1 parent 77f783d5fc
commit 6b4b680116
1 file changed
+8 -2
+8 -2
View File
@@ -61,8 +61,14 @@ if [ -n "$1" ]; then
executable_path="$1"
;;
Darwin*)
executable_name=`basename "$1" .app`
executable_path="$1/Contents/MacOS/$executable_name"
# Special case: allow to specify path to the executable within .app
full_path_part=`echo "$1" | grep "\.app/Contents/MacOS"`
if [ -z "$full_path_part" ]; then
executable_name=`basename "$1" .app`
executable_path="$1/Contents/MacOS/$executable_name"
else
executable_path="$1"
fi
;;
esac
fi