mirror of
https://github.com/aclist/dztui.git
synced 2025-04-05 12:03:00 +02:00
fix: return from config function
This commit is contained in:
parent
22e96873d9
commit
95db1e01c3
1 changed files with 10 additions and 7 deletions
17
dzgui.sh
17
dzgui.sh
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
version=3.2.15
|
||||
version=3.2.16
|
||||
|
||||
aid=221100
|
||||
game="dayz"
|
||||
|
@ -247,6 +247,13 @@ file_picker(){
|
|||
}
|
||||
create_config(){
|
||||
check_pyver
|
||||
write_to_config(){
|
||||
mkdir -p $config_path
|
||||
write_config > $config_file
|
||||
info "Config file created at $config_file."
|
||||
source $config_file
|
||||
return
|
||||
}
|
||||
while true; do
|
||||
player_input="$($steamsafe_zenity --forms --add-entry="Player name (required for some servers)" --add-entry="BattleMetrics API key" --add-entry="Steam API key" --title="DZGUI" --text="DZGUI" $sd_res --separator="│" 2>/dev/null)"
|
||||
#explicitly setting IFS crashes $steamsafe_zenity in loop
|
||||
|
@ -268,7 +275,7 @@ create_config(){
|
|||
else
|
||||
while true; do
|
||||
echo "STEAMSAFEZENITY: $steamsafe_zenity" >> /tmp/debug.log
|
||||
[[ -n $steam_path ]] && break
|
||||
[[ -n $steam_path ]] && { write_to_config; return; }
|
||||
find_default_path
|
||||
find_library_folder "$default_steam_path"
|
||||
if [[ -z $steam_path ]]; then
|
||||
|
@ -281,11 +288,7 @@ create_config(){
|
|||
exit
|
||||
fi
|
||||
else
|
||||
mkdir -p $config_path
|
||||
write_config > $config_file
|
||||
info "Config file created at $config_file."
|
||||
source $config_file
|
||||
return
|
||||
write_to_config
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue