mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
fix: file picker function
This commit is contained in:
parent
0a5e6730fc
commit
292e6f3921
1 changed files with 7 additions and 6 deletions
13
dzgui.sh
13
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=3.2.9
|
version=3.2.10
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -88,9 +88,9 @@ depcheck(){
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
watcher_deps(){
|
watcher_deps(){
|
||||||
if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then
|
if [[ ! $(command -v wmctrl) ]] || [[ ! $(command -v xdotool) ]]; then
|
||||||
echo "100"
|
echo "100"
|
||||||
warn "Missing dependency: requires 'wmctrl' or 'xdotool'.\nInstall from your system's package manager."
|
warn "Missing dependency: requires 'wmctrl' and 'xdotool'.\nInstall from your system's package manager."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ freedesktop_dirs(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
find_library_folder(){
|
find_library_folder(){
|
||||||
steam_path=$(python3 $helpers_path/vdf2json.py -i $default_steam_path/steamapps/libraryfolders.vdf | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')
|
steam_path=$(python3 "$helpers_path/vdf2json.py" -i "$1/steamapps/libraryfolders.vdf" | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')
|
||||||
}
|
}
|
||||||
file_picker(){
|
file_picker(){
|
||||||
while true; do
|
while true; do
|
||||||
|
@ -237,7 +237,7 @@ file_picker(){
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
default_steam_path="$path"
|
default_steam_path="$path"
|
||||||
find_library_folder
|
find_library_folder "$default_steam_path"
|
||||||
fi
|
fi
|
||||||
if [[ -z $steam_path ]]; then
|
if [[ -z $steam_path ]]; then
|
||||||
warn "DayZ not found at this path."
|
warn "DayZ not found at this path."
|
||||||
|
@ -485,7 +485,7 @@ auto_mod_install(){
|
||||||
[[ $force_update -eq 1 ]] && { unset force_update; return; }
|
[[ $force_update -eq 1 ]] && { unset force_update; return; }
|
||||||
if [[ -z $diff ]]; then
|
if [[ -z $diff ]]; then
|
||||||
check_timestamps
|
check_timestamps
|
||||||
passed_mod_check > >($steamsafe_zenity --pulsate --progress --title=DZGUI --auto-close --width=500 2>/dev/null)
|
passed_mod_check > >($steamsafe_zenity --pulsate --progress --title="DZGUI" --auto-close --width=500 2>/dev/null)
|
||||||
launch
|
launch
|
||||||
else
|
else
|
||||||
manual_mod_install
|
manual_mod_install
|
||||||
|
@ -1767,6 +1767,7 @@ while true; do
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
lock(){
|
lock(){
|
||||||
|
[[ ! -d $config_path ]] && return
|
||||||
if [[ ! -f ${config_path}.lockfile ]]; then
|
if [[ ! -f ${config_path}.lockfile ]]; then
|
||||||
touch ${config_path}.lockfile
|
touch ${config_path}.lockfile
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue