1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-29 13:52:03 +01:00

fix: correct option index

This commit is contained in:
aclist 2023-01-20 02:02:36 +09:00
parent 17930e4e6a
commit 333a86b90b

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -o pipefail set -o pipefail
version=3.3.0-rc.4 version=3.3.0-rc.5
aid=221100 aid=221100
game="dayz" game="dayz"
@ -1130,28 +1130,29 @@ options_menu(){
[[ $toggle_steam -eq 1 ]] && debug_list+=("Toggle native Steam or Flatpak [$steam_hr]") [[ $toggle_steam -eq 1 ]] && debug_list+=("Toggle native Steam or Flatpak [$steam_hr]")
debug_sel=$($steamsafe_zenity --list --width=1280 --height=800 --column="Options" --title="DZGUI" --hide-header "${debug_list[@]}" 2>/dev/null) debug_sel=$($steamsafe_zenity --list --width=1280 --height=800 --column="Options" --title="DZGUI" --hide-header "${debug_list[@]}" 2>/dev/null)
[[ -z $debug_sel ]] && return [[ -z $debug_sel ]] && return
if [[ $debug_sel == "${debug_list[0]}" ]]; then case "$debug_sel" in
enforce_dl=1 "Toggle branch")
toggle_branch && enforce_dl=1
check_version toggle_branch &&
elif [[ $debug_sel == "${debug_list[1]}" ]]; then check_version
toggle_debug ;;
elif [[ $debug_sel == "${debug_list[2]}" ]]; then "Toggle debug mode") toggle_debug ;;
source_script=$(realpath "$0") "Generate debug log")
source_dir=$(dirname "$source_script") source_script=$(realpath "$0")
generate_log > "$source_dir/DZGUI.log" source_dir=$(dirname "$source_script")
printf "[DZGUI] Wrote log file to %s/log\n" "$source_dir" generate_log > "$source_dir/DZGUI.log"
$steamsafe_zenity --info --width 500 --title="DZGUI" --text="Wrote log file to \n$source_dir/log" 2>/dev/null printf "[DZGUI] Wrote log file to %s/log\n" "$source_dir"
elif [[ $debug_sel == "${debug_list[3]}" ]]; then $steamsafe_zenity --info --width 500 --title="DZGUI" --text="Wrote log file to \n$source_dir/log" 2>/dev/null
toggle_console_dl ;;
elif [[ $debug_sel == "${debug_list[4]}" ]]; then Toggle[[:space:]]auto*) toggle_console_dl ;;
force_update=1 "Force update local mods")
force_update_mods force_update=1
merge_modlists > >($steamsafe_zenity --pulsate --progress --no-cancel --auto-close --title=DZGUI --width=500 2>/dev/null) force_update_mods
auto_mod_install merge_modlists > >($steamsafe_zenity --pulsate --progress --no-cancel --auto-close --title=DZGUI --width=500 2>/dev/null)
elif [[ $debug_sel == "${debug_list[5]}" ]]; then auto_mod_install
toggle_steam_binary ;;
fi Toggle[[:space:]]native*) toggle_steam_binary ;;
esac
} }
query_and_connect(){ query_and_connect(){
[[ -z $whitelist ]] && { popup 600; return; } [[ -z $whitelist ]] && { popup 600; return; }