feat: add fnOS packaging, storage workflows and release pipeline

This commit is contained in:
2026-08-11 18:05:49 +08:00
parent c5922f9b08
commit 95932f0199
181 changed files with 24024 additions and 1164 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
set -eu
DATA_ROOT="${TRIM_APPDEST_VOL}/@appshare/dy.net"
DB_ROOT="${DATA_ROOT}/db"
DB_FILE="${DB_ROOT}/dy.sqlite"
BACKUP_ROOT="${DB_ROOT}/upgrade-backups"
if [ ! -f "${DB_FILE}" ]; then exit 0; fi
mkdir -p "${BACKUP_ROOT}"
DEST="${BACKUP_ROOT}/fpk-pre-0.2.25-$(date '+%Y%m%d-%H%M%S')"
mkdir -p "${DEST}"
cp -p "${DB_FILE}" "${DEST}/dy.sqlite"
if [ -f "${DB_FILE}-wal" ]; then cp -p "${DB_FILE}-wal" "${DEST}/dy.sqlite-wal"; fi
if [ -f "${DB_FILE}-shm" ]; then cp -p "${DB_FILE}-shm" "${DEST}/dy.sqlite-shm"; fi
if [ -d "${DB_ROOT}/keys" ]; then cp -a "${DB_ROOT}/keys" "${DEST}/keys"; fi
# Avoid GNU find -printf: fnOS releases may provide the BusyBox find implementation.
ls -1dt -- "${BACKUP_ROOT}"/* 2>/dev/null | tail -n +4 | while IFS= read -r backup; do
if [ -d "${backup}" ]; then rm -rf -- "${backup}"; fi
done
exit 0