1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 13:22:35 +01:00

Compare commits

..

2 commits

Author SHA1 Message Date
66eb4cf6d4
Merge ae01c04caa into e6b5e40bb2 2024-12-15 09:14:03 +09:00
aclist
e6b5e40bb2 chore: add logging 2024-12-15 08:57:25 +09:00
3 changed files with 13 additions and 3 deletions

View file

@ -1,5 +1,9 @@
# Changelog
## [5.6.0-beta.17] 2024-12-14
### Added
- Additional logging
## [5.6.0-beta.16] 2024-12-13
### Fixed
- Add remote resource health checks before downloading updates

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -o pipefail
version=5.6.0-beta.16
version=5.6.0-beta.17
#CONSTANTS
aid=221100
@ -487,7 +487,7 @@ stale_symlinks(){
local game_dir="$steam_path/steamapps/common/DayZ"
for l in $(find "$game_dir" -xtype l); do
logger DEBUG "Updating stale symlink '$l'"
unlink $l
unlink "$l"
done
}
local_latlon(){
@ -585,7 +585,7 @@ fetch_helpers_by_sum(){
["ui.py"]="be3da1e542d14105f4358dd38901e25a"
["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="10c7d9cb9fbb792626ec9e7a4a788ba5"
["funcs"]="37897aa36bc2fb6286cee02c8bb07258"
["lan"]="c62e84ddd1457b71a85ad21da662b9af"
)
local author="aclist"

View file

@ -1170,19 +1170,24 @@ compare(){
echo "$diff"
}
legacy_symlinks(){
logger INFO "Removing legacy symlinks"
for d in "$game_dir"/*; do
if [[ $d =~ @[0-9]+-.+ ]]; then
logger INFO "Unlinking $d"
unlink "$d"
fi
done
readarray -t mod_dirs < <(find "$workshop_dir" -maxdepth 1 -mindepth 1 -type d)
logger INFO "Read local mods into array with length: ${#mod_dirs[@]}"
[[ ${#mod_dirs[@]} -eq 0 ]] && return
logger INFO "Removing legacy encoding format"
for d in "${mod_dirs[@]}"; do
# suppress errors if mods are downloading at boot
[[ ! -f "$d/meta.cpp" ]] && continue
local id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}')
local encoded_id=$(echo "$id" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g')
if [[ -h "$game_dir/@$encoded_id" ]]; then
logger INFO "Unlinking $game_dir/@$encoded_id"
unlink "$game_dir/@$encoded_id"
fi
done
@ -1190,6 +1195,7 @@ legacy_symlinks(){
symlinks(){
readarray -t mod_dirs < <(find "$workshop_dir" -maxdepth 1 -mindepth 1 -type d)
[[ ${#mod_dirs[@]} -eq 0 ]] && return
logger INFO "Generating symlinks in new format"
for d in "${mod_dirs[@]}"; do
# suppress errors if mods are downloading at boot
[[ ! -f "$d/meta.cpp" ]] && continue