fix: write file after wiping cache
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled

This commit is contained in:
aclist committed 2026-01-15 05:18:13 +09:00
1 parent 317f60eddd
commit 11c29112c2
5 files changed
+22 -6

No files matched your search

+5 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -o pipefail
version="6.0.0-beta.19"
version="6.0.0-beta.20"
#CONSTANTS
aid=221100
@@ -51,6 +51,7 @@ _cache_binary="$cache_dir/$prefix.binary"
_cache_coords="$cache_path/$prefix.coords"
_cache_cooldown="$cache_path/$prefix.cooldown"
_cache_lan="$cache_path/$prefix.lan"
_cache_src_path="$cache_path/$prefix.src"
#XDG
freedesktop_path="$HOME/.local/share/applications"
@@ -396,6 +397,7 @@ get_dist(){
logger INFO "Distance: $dist km"
fi
}
query_config(){
[[ -n $2 ]] && local key=$2
keys=(
@@ -421,6 +423,7 @@ query_config(){
echo "${!i}"
done
}
align_versions_file(){
shift
local mod="$1"
@@ -586,9 +589,6 @@ default_steam_path="$default_steam_path"
#Preferred Steam launch command (for Flatpak support)
preferred_client="$preferred_client"
#DZGUI source path
src_path="$src_path"
END
}
format_version_url(){
@@ -642,6 +642,7 @@ download_new_version(){
return 1
fi
local version_url="$(format_version_url)"
local src_path="$(< "$_cache_src_path")"
mv "$src_path" "$src_path.old"
curl -Ls "$version_url" > "$src_path"
rc=$?