infra/dev: env_value defaults match compose, die helper, shared Gradle lock check; drop unused RCLONE_REMOTE and M2a leftovers; fix stale Pi compose path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
2026-10-18 22:11:07 +02:00
parent 61f92c81c5
commit fc6126c6af
7 changed files with 25 additions and 37 deletions
+2 -2
View File
@@ -6,13 +6,13 @@ set -euo pipefail
# shellcheck source=lib.sh
. "$(dirname "$0")/lib.sh"
backup_dir="$(dev_path "$(env_value KVITT_DEV_BACKUP_DIR)")"
backup_dir="$(dev_path "$(env_value KVITT_DEV_BACKUP_DIR ./backups)")"
mkdir -p "$backup_dir"
compose --profile backup run --rm -T backup /backup.sh
latest="$(find "$backup_dir" -maxdepth 1 -name 'kvitt-*.sqlite.gz' | sort | tail -n 1)"
[[ -n "$latest" ]] || { echo "backup.sh: no snapshot found in $backup_dir" >&2; exit 1; }
[[ -n "$latest" ]] || die "no snapshot found in $backup_dir"
name="$(basename "$latest")"
result="$(compose --profile backup run --rm -T --entrypoint sh backup -c \
"gunzip -c '/backups/$name' > /tmp/check.sqlite && sqlite3 -batch -noheader -list /tmp/check.sqlite 'PRAGMA integrity_check'")"