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
9c7ade92fb
commit
51208bd39a
1 changed files with 10 additions and 7 deletions
17
dzgui.sh
17
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=3.2.15
|
version=3.2.16
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -247,6 +247,13 @@ file_picker(){
|
||||||
}
|
}
|
||||||
create_config(){
|
create_config(){
|
||||||
check_pyver
|
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
|
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)"
|
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
|
#explicitly setting IFS crashes $steamsafe_zenity in loop
|
||||||
|
@ -268,7 +275,7 @@ create_config(){
|
||||||
else
|
else
|
||||||
while true; do
|
while true; do
|
||||||
echo "STEAMSAFEZENITY: $steamsafe_zenity" >> /tmp/debug.log
|
echo "STEAMSAFEZENITY: $steamsafe_zenity" >> /tmp/debug.log
|
||||||
[[ -n $steam_path ]] && break
|
[[ -n $steam_path ]] && { write_to_config; return; }
|
||||||
find_default_path
|
find_default_path
|
||||||
find_library_folder "$default_steam_path"
|
find_library_folder "$default_steam_path"
|
||||||
if [[ -z $steam_path ]]; then
|
if [[ -z $steam_path ]]; then
|
||||||
|
@ -281,11 +288,7 @@ create_config(){
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
mkdir -p $config_path
|
write_to_config
|
||||||
write_config > $config_file
|
|
||||||
info "Config file created at $config_file."
|
|
||||||
source $config_file
|
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue