1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 21:32:36 +01:00

fix: move debug file location

This commit is contained in:
aclist 2023-05-11 13:30:49 +09:00
parent 116fd23a67
commit ab3a192149

View file

@ -1,7 +1,7 @@
#!/bin/bash
set -o pipefail
version=3.2.12
version=3.2.13
aid=221100
game="dayz"
@ -228,17 +228,17 @@ freedesktop_dirs(){
fi
}
find_library_folder(){
echo "ENTERED: ${FUNCNAME[0]}" >> $config_path/debug.log
echo "RECEIVED ARG: $1" >> $config_path/debug.log
echo "ENTERED: ${FUNCNAME[0]}" >> /tmp/debug.log
echo "RECEIVED ARG: $1" >> /tmp/debug.log
steam_path=$(python3 "$helpers_path/vdf2json.py" -i "$1/steamapps/libraryfolders.vdf" | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')
echo "STEAM PATH RESOLVED TO: $steam_path" >> $config_path/debug.log
echo "STEAM PATH RESOLVED TO: $steam_path" >> /tmp/debug.log
}
file_picker(){
echo "${FUNCNAME[0]}" >> $config_path/debug.log
echo "${FUNCNAME[0]}" >> /tmp/debug.log
local path=$($steamsafe_zenity --file-selection --directory 2>/dev/null)
echo "FILE PICKER PATH RESOLVED TO: $path" >> $config_path/debug.log
echo "FILE PICKER PATH RESOLVED TO: $path" >> /tmp/debug.log
if [[ -z "$path" ]]; then
echo "PATH WAS EMPTY" >> $config_path/debug.log
echo "PATH WAS EMPTY" >> /tmp/debug.log
return
else
default_steam_path="$path"
@ -267,14 +267,14 @@ create_config(){
warn "Invalid BM API key"
else
while true; do
echo "STEAMSAFEZENITY: $steamsafe_zenity" >> $config_path/debug.log
echo "STEAMSAFEZENITY: $steamsafe_zenity" >> /tmp/debug.log
find_default_path
find_library_folder "$default_steam_path"
if [[ -z $steam_path ]]; then
echo "STEAM PATH WAS EMPTY" >> $config_path/debug.log
echo "STEAM PATH WAS EMPTY" >> /tmp/debug.log
zenity --question --text="DayZ not found or not installed at the chosen path." --ok-label="Choose path manually" --cancel-label="Exit"
if [[ $? -eq 0 ]]; then
echo "USER SELECTED FILE PICKER" >> $config_path/debug.log
echo "USER SELECTED FILE PICKER" >> /tmp/debug.log
file_picker
else
exit
@ -1065,7 +1065,7 @@ find_default_path(){
default_steam_path="$HOME/.steam/steam"
else
local res=$(echo -e "Let DZGUI auto-discover Steam path (accurate, slower)\nSelect the Steam path manually (less accurate, faster)" | $steamsafe_zenity --list --column="Choice" --title=DZGUI --hide-header --text="Steam is not installed in a standard location." $sd_res)
echo "USER CHOSE: $res" >> $config_path/debug.log
echo "USER CHOSE: $res" >> /tmp/debug.log
case "$res" in
*auto*) discover ;;
*manual*)
@ -1074,7 +1074,7 @@ find_default_path(){
esac
fi
fi
echo "FOUND DEFAULT PATH AT: $default_steam_path" >> $config_path/debug.log
echo "FOUND DEFAULT PATH AT: $default_steam_path" >> /tmp/debug.log
}
popup(){
pop(){