harmonize with coredesktop

This commit is contained in:
David Young
2026-10-28 14:35:07 -06:00
parent 866720c3c1
commit 9b9f1d5fdd
35 changed files with 1445 additions and 8 deletions
+23
View File
@@ -56,6 +56,29 @@ enable_services() {
done
}
# Run each script in migrations/ that hasn't succeeded on this machine yet, in
# order, and record it once it does. Stops at the first failure so later
# migrations can rely on earlier ones; it runs again on the next update.
run_migrations() {
local dir="${MINISERVER:-$HOME/.local/share/MiniServer}/migrations"
local state="$HOME/.local/state/miniserver/migrations"
local file name
mkdir -p "$state"
for file in "$dir"/*.sh; do
[ -f "$file" ] || continue
name="$(basename "$file")"
[ -f "$state/$name" ] && continue
echo "Running migration $name..."
if ! bash "$file"; then
echo "Migration $name failed; it will run again on the next update."
return 1
fi
touch "$state/$name"
done
}
# Output of the last update's pacman -Su, written by updates.d/10-pacman.sh
PACMAN_UPDATE_LOG="$HOME/.local/state/miniserver/pacman-update.log"