File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,10 @@ if [ "$#" -eq 0 ]; then
88 exit 1
99fi
1010
11- # Names of executables that we do not want LD_PRELOAD set for
12- DISABLE_LD_PRELOAD=(" cs2.sh" )
1311
14- # Combine all command line arguments into a single string
15- command_line= " $0 $@ "
16- disable_preload=false
12+ # Add exe names newline separated to the string to disable LD_PRELOAD
13+ DISABLE_LD_PRELOAD= " cs2.sh
14+ some_other_exe "
1715
1816MANGOHUD_LIB_NAME=" @ld_libdir_mangohud@libMangoHud_opengl.so"
1917
@@ -29,9 +27,14 @@ if [ "$1" = "--version" ]; then
2927 exit 0
3028fi
3129
32- # Check if any of the names in DISABLE_LD_PRELOAD are in the command line
33- for name in " ${DISABLE_LD_PRELOAD[@]} " ; do
34- if echo " $command_line " | grep -q " $name " ; then
30+ # grab all arguments from command_line
31+ command_line=" $* "
32+ # flag for disable_preload
33+ disable_preload=false
34+
35+ # Check if the script name or any of the executables in DISABLE_LD_PRELOAD are in the command line
36+ for exe in $DISABLE_LD_PRELOAD ; do
37+ if echo " $command_line " | grep -q " $exe " ; then
3538 disable_preload=true
3639 break
3740 fi
You can’t perform that action at this time.
0 commit comments