From 2fda35d5cb6d8b0787bdb3ce44e999a016a2efb9 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Fri, 20 Nov 2020 09:46:54 -0500 Subject: [PATCH] =?UTF-8?q?Allow=20=E2=80=9CStarCitizen=E2=80=9D=20without?= =?UTF-8?q?=20spaces=20as=20gamedir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lug-helper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 919730d..3443290 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -265,7 +265,7 @@ getdirs() { fi if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then game_path="$(cat "$conf_dir/$conf_subdir/$game_conf")" - if [ ! -d "$game_path" ] || [ "$(basename "$game_path")" != "Star Citizen" ]; then + if [ ! -d "$game_path" ] || ([ "$(basename "$game_path")" != "Star Citizen" ] && [ "$(basename "$game_path")" != "StarCitizen" ]); then echo -e "\nUnexpected game path found in config file, ignoring.\n" game_path="" fi @@ -301,7 +301,7 @@ getdirs() { if [ "$?" -eq -1 ]; then message warning "An unexpected error has occurred. The helper is unable to proceed." return 1 - elif [ "$(basename "$game_path")" != "Star Citizen" ]; then + elif [ "$(basename "$game_path")" != "Star Citizen" ] && [ "$(basename "$game_path")" != "StarCitizen" ]; then message warning "You must select the directory named 'Star Citizen'" else # All good or cancel @@ -349,7 +349,7 @@ getdirs() { while read -rp ": " game_path; do if [ ! -d "$game_path" ]; then echo -e "That directory is invalid or does not exist. Please try again.\n" - elif [ "$(basename "$game_path")" != "Star Citizen" ]; then + elif [ "$(basename "$game_path")" != "Star Citizen" ] && [ "$(basename "$game_path")" != "StarCitizen" ]; then echo -e "You must enter the full path to the directory named 'Star Citizen'" else break