mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 21:32:36 +01:00
Streamline progress notifier
This commit is contained in:
parent
079e20e49f
commit
77bd6bdf9c
2 changed files with 10 additions and 20 deletions
|
@ -5,6 +5,10 @@
|
||||||
- Custom query API
|
- Custom query API
|
||||||
- Standardize dialogs
|
- Standardize dialogs
|
||||||
|
|
||||||
|
## [3.1.0-rc.7] 2022-10-25
|
||||||
|
### Changed
|
||||||
|
- Simplify mod progress watcher
|
||||||
|
|
||||||
## [3.1.0-rc.6] 2022-10-25
|
## [3.1.0-rc.6] 2022-10-25
|
||||||
### Fixed
|
### Fixed
|
||||||
- Download mod metadata
|
- Download mod metadata
|
||||||
|
|
26
dzgui.sh
26
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=3.1.0-rc.6
|
version=3.1.0-rc.7
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -542,12 +542,12 @@ auto_mod_install(){
|
||||||
log="$default_steam_path/logs/content_log.txt"
|
log="$default_steam_path/logs/content_log.txt"
|
||||||
[[ -f "/tmp/dz.status" ]] && rm "/tmp/dz.status"
|
[[ -f "/tmp/dz.status" ]] && rm "/tmp/dz.status"
|
||||||
touch "/tmp/dz.status"
|
touch "/tmp/dz.status"
|
||||||
depot_watcher "$diff" &
|
|
||||||
console_dl "$diff" &&
|
console_dl "$diff" &&
|
||||||
steam steam://open/downloads 2>/dev/null 1>&2
|
steam steam://open/downloads && 2>/dev/null 1>&2
|
||||||
until [[ $(tail -n1 "/tmp/dz.status") =~ "Finished" ]]; do
|
until [[ -z $(comm -23 <(printf "%s\n" "${modids[@]}" | sort) <(ls -1 $workshop_dir | sort)) ]]; do
|
||||||
sleep 0.1s
|
local missing=$(comm -23 <(printf "%s\n" "${modids[@]}" | sort) <(ls -1 $workshop_dir | sort) | wc -l)
|
||||||
done
|
echo "# Downloaded $((${#modids[@]}-missing)) of ${#modids[@]} mods"
|
||||||
|
done | zenity --pulsate --progress --title=DZGUI --auto-close --no-cancel --width=500 2>/dev/null
|
||||||
compare
|
compare
|
||||||
if [[ -z $diff ]]; then
|
if [[ -z $diff ]]; then
|
||||||
check_timestamps
|
check_timestamps
|
||||||
|
@ -1059,20 +1059,6 @@ toggle_headless(){
|
||||||
[[ $is_steam_deck -eq 1 ]] && big_prompt="--width=800"
|
[[ $is_steam_deck -eq 1 ]] && big_prompt="--width=800"
|
||||||
[[ $auto_install == "1" ]] && zenity --info --text="$(automods_prompt)" $big_prompt 2>/dev/null
|
[[ $auto_install == "1" ]] && zenity --info --text="$(automods_prompt)" $big_prompt 2>/dev/null
|
||||||
}
|
}
|
||||||
depot_watcher(){
|
|
||||||
readarray -t watched_mods <<< "$@"
|
|
||||||
for i in "${watched_mods[@]}"; do
|
|
||||||
echo "[DZGUI] Downloading mod $i"
|
|
||||||
until [[ -d "$workshop_dir/$i" ]]; do
|
|
||||||
sleep 0.1s
|
|
||||||
done
|
|
||||||
until [[ "$(tail -n1 $log)" =~ AppID[[:space:]]221100[[:space:]]scheduler[[:space:]]finished ]]; do
|
|
||||||
sleep 0.1s
|
|
||||||
done
|
|
||||||
done
|
|
||||||
echo "Finished" >> "/tmp/dz.status"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
console_dl(){
|
console_dl(){
|
||||||
readarray -t modids <<< "$@"
|
readarray -t modids <<< "$@"
|
||||||
steam steam://open/console 2>/dev/null 1>&2
|
steam steam://open/console 2>/dev/null 1>&2
|
||||||
|
|
Loading…
Reference in a new issue