PCSX2-linux.sh: update the script due to the renaming

This commit is contained in:
Gregory Hainaut 2015-05-18 09:55:17 +02:00
parent 432a73e039
commit 5bd724e651
1 changed files with 14 additions and 17 deletions

View File

@ -24,26 +24,31 @@
# 3/ Set __GL_THREADED_OPTIMIZATIONS variable for Nvidia Drivers (major speed boost)
current_script=$0
me=PCSX2-linux.sh
# We are already in the good directory. Allow to use "bash launch_pcsx2_linux.sh"
if [ $current_script = "launch_pcsx2_linux.sh" ]
# We are already in the good directory. Allow to use "bash PCSX2-linux.sh"
if [ $current_script = $me ]
then
if [ -e "./launch_pcsx2_linux.sh" ]
if [ -e "./$me" ]
then
current_script="./launch_pcsx2_linux.sh"
current_script="./$me"
else
current_script=`which launch_pcsx2_linux.sh`
current_script=`which $me`
fi
fi
[ $current_script = "launch_pcsx2_linux.sh" ] && \
echo "Error the script was either directly 'called' (ie launch_pcsx2_linux.sh)" && \
echo "Use either /absolute_path/launch_pcsx2_linux.sh or ./relative_path/launch_pcsx2_linux.sh" && return 1;
# Avoid to screw up the shell context
DIR=`dirname $current_script`
MY_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
if [ ! -x "$DIR/PCSX2" ]
then
echo "Error PCSX2 not found in $DIR"
echo "Maybe the script was directly 'called'"
echo "Use either /absolute_path/$me or ./relative_path/$me"
return 1 # warning exit will kill current terminal
fi
# Allow to ship .so library with the build to avoid version issue
MY_LD_LIBRARY_PATH=${MY_LD_LIBRARY_PATH:+$MY_LD_LIBRARY_PATH:}$DIR/3rdPartyLibs
@ -64,13 +69,5 @@ then
done
fi
if [ ! -x "$DIR/PCSX2" ]
then
echo "Error PCSX2 not found"
echo "Maybe the script was directly 'called'"
echo "Use either /absolute_path/launch_pcsx2_linux.sh or ./relative_path/launch_pcsx2_linux.sh"
return 1 # warning exit will kill current terminal
fi
# And finally launch me
LD_LIBRARY_PATH="$MY_LD_LIBRARY_PATH" __GL_THREADED_OPTIMIZATIONS=1 $DIR/PCSX2 $@