From 74a4cb77039b41ef8b6d0a8ecece73ebc0b9404c Mon Sep 17 00:00:00 2001 From: "gregory.hainaut" Date: Tue, 9 Oct 2012 16:33:07 +0000 Subject: [PATCH] linux: allow to use the shell interpreter to execute the launcher script => "bash launch_pcsx2_linux.sh" git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5432 96395faa-99c1-11dd-bbfe-3dabce05a288 --- bin/launch_pcsx2_linux.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/launch_pcsx2_linux.sh b/bin/launch_pcsx2_linux.sh index 7383eb0df2..f18241ea83 100755 --- a/bin/launch_pcsx2_linux.sh +++ b/bin/launch_pcsx2_linux.sh @@ -24,8 +24,17 @@ current_script=$0 -[ $current_script = "launch_pcsx2_linux.sh" ] || [ $current_script = "sh" ] || [ $current_script = "bash" ] && \ - echo "Error the script was directly 'called'" && \ +# We are already in the good directory. Allow to use "bash launch_pcsx2_linux.sh" +if [ $current_script = "launch_pcsx2_linux.sh" ] +then + if [ -e "./launch_pcsx2_linux.sh" ] + then + current_script="./launch_pcsx2_linux.sh" + 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" && exit 1; # Note: sh (dash on debian) does not support pushd, popd...