mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-15 00:40:35 +00:00
Syntax fixes
This commit is contained in:
parent
4772265c99
commit
c45b974f43
@ -125,15 +125,15 @@ getdirs() {
|
|||||||
# Check if the config files already exist
|
# Check if the config files already exist
|
||||||
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$wine_conf" ]; then
|
||||||
found_wine_conf=1
|
found_wine_conf=1
|
||||||
wine_prefix="$(cat $conf_dir/$conf_subdir/$wine_conf")"
|
wine_prefix="$(cat "$conf_dir/$conf_subdir/$wine_conf")"
|
||||||
fi
|
fi
|
||||||
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$game_conf" ]; then
|
||||||
found_game_conf=1
|
found_game_conf=1
|
||||||
game_path="$(cat $conf_dir/$conf_subdir/$game_conf")"
|
game_path="$(cat "$conf_dir/$conf_subdir/$game_conf")"
|
||||||
fi
|
fi
|
||||||
if [ -f "$conf_dir/$conf_subdir/$backup_conf" ]; then
|
if [ -f "$conf_dir/$conf_subdir/$backup_conf" ]; then
|
||||||
found_backup_conf=1
|
found_backup_conf=1
|
||||||
backup_path="$(cat $conf_dir/$conf_subdir/$backup_conf")"
|
backup_path="$(cat "$conf_dir/$conf_subdir/$backup_conf")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$found_wine_config" ] || [ -z "$found_game_conf" ] || [ -z "$found_backup_conf" ]; then
|
if [ -z "$found_wine_config" ] || [ -z "$found_game_conf" ] || [ -z "$found_backup_conf" ]; then
|
||||||
@ -155,7 +155,7 @@ getdirs() {
|
|||||||
message 2 "An unexpected error has occurred."
|
message 2 "An unexpected error has occurred."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(basename $game_path)" != "LIVE" ]; then
|
if [ "$(basename "$game_path")" != "LIVE" ]; then
|
||||||
message 2 "You must select your LIVE directory."
|
message 2 "You must select your LIVE directory."
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
@ -192,7 +192,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)" != "LIVE" ]; then
|
elif [ "$(basename "$game_path")" != "LIVE" ]; then
|
||||||
echo -e "You must select your LIVE directory."
|
echo -e "You must select your LIVE directory."
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
@ -213,6 +213,7 @@ getdirs() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Save the paths for later use
|
# Save the paths for later use
|
||||||
echo "$wine_prefix" > "$conf_dir/$conf_subdir/$wine_conf"
|
echo "$wine_prefix" > "$conf_dir/$conf_subdir/$wine_conf"
|
||||||
@ -237,7 +238,7 @@ sanitize() {
|
|||||||
|
|
||||||
# Check for exported keybind files
|
# Check for exported keybind files
|
||||||
exported=0 # Default to none found
|
exported=0 # Default to none found
|
||||||
if [ ! -d "$mappings_dir" ] || [ -z "$(ls -A $mappings_dir)" ]; then
|
if [ ! -d "$mappings_dir" ] || [ -z "$(ls -A "$mappings_dir")" ]; then
|
||||||
message 1 "Warning: No exported keybindings found. Keybinds will not be backed up!"
|
message 1 "Warning: No exported keybindings found. Keybinds will not be backed up!"
|
||||||
exported=0
|
exported=0
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user