mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-27 08:24:20 +00:00
Allow “StarCitizen” without spaces as gamedir
This commit is contained in:
parent
12fcc9e057
commit
2fda35d5cb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user