mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 16:14:21 +00:00
Allow “StarCitizen” without spaces as gamedir
This commit is contained in:
parent
12fcc9e057
commit
2fda35d5cb
@ -265,7 +265,7 @@ getdirs() {
|
|||||||
fi
|
fi
|
||||||
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
||||||
game_path="$(cat "$conf_dir/$conf_subdir/$game_conf")"
|
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"
|
echo -e "\nUnexpected game path found in config file, ignoring.\n"
|
||||||
game_path=""
|
game_path=""
|
||||||
fi
|
fi
|
||||||
@ -301,7 +301,7 @@ getdirs() {
|
|||||||
if [ "$?" -eq -1 ]; then
|
if [ "$?" -eq -1 ]; then
|
||||||
message warning "An unexpected error has occurred. The helper is unable to proceed."
|
message warning "An unexpected error has occurred. The helper is unable to proceed."
|
||||||
return 1
|
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'"
|
message warning "You must select the directory named 'Star Citizen'"
|
||||||
else
|
else
|
||||||
# All good or cancel
|
# All good or cancel
|
||||||
@ -349,7 +349,7 @@ getdirs() {
|
|||||||
while read -rp ": " game_path; do
|
while read -rp ": " game_path; do
|
||||||
if [ ! -d "$game_path" ]; then
|
if [ ! -d "$game_path" ]; then
|
||||||
echo -e "That directory is invalid or does not exist. Please try again.\n"
|
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'"
|
echo -e "You must enter the full path to the directory named 'Star Citizen'"
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user