chore: back up Pi environment

This commit is contained in:
2026-07-14 00:26:08 +05:00
commit 10dcbedcc2
75 changed files with 1410 additions and 0 deletions

30
assemble-pi-backup.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -Eeuo pipefail
# Reassemble a Git-LFS split Pi backup after `git lfs pull`.
# Usage: ./assemble-pi-backup.sh [backup-base-name]
base=${1:-pi-backup-20260714-002452.tar.zst}
shopt -s nullglob
parts=("${base}".part-*)
(( ${#parts[@]} > 0 )) || {
printf 'No archive parts found for %s\n' "$base" >&2
exit 1
}
for command in cat sha256sum; do
command -v "$command" >/dev/null || {
printf 'Required command is unavailable: %s\n' "$command" >&2
exit 1
}
done
cat "${parts[@]}" > "$base"
printf 'Created: %s\n' "$base"
if [[ -f "${base}.sha256" ]]; then
sha256sum -c "${base}.sha256"
else
printf 'Checksum file not found: %s.sha256\n' "$base" >&2
fi