mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 00:55:13 +08:00
⛄ Sync 2026-08-12 20:59:19
This commit is contained in:
1 parent
99ea32a4ad
commit
5c59dccedc
62 files changed
+2165
-809
No files matched your search
@@ -22,9 +22,9 @@ scp -q "$D"/ucode/template/themes/$N/*.ut "$R":/usr/share/ucode/luci/templ
|
||||
ssh "$R" "mkdir -p /usr/share/ucode/luci/template/themes/$N/partials"
|
||||
scp -q "$D"/ucode/template/themes/$N/partials/*.ut "$R":/usr/share/ucode/luci/template/themes/$N/partials/
|
||||
|
||||
# shared static (cascade.css, fonts, logo). The doodle wallpapers are NOT here and not in the
|
||||
# package: they are downloaded on demand from GitHub (fs-prefs.js installWallpaper), so the dev
|
||||
# router deliberately starts without them — that is the state to test the download dialog in.
|
||||
# shared static: cascade.css and the two logo files, which is all this directory holds. No
|
||||
# wallpapers — the doodles this theme once downloaded from GitHub are gone, and nothing in the
|
||||
# package fetches anything at run time; the Background axis paints an SVG the admin uploads.
|
||||
scp -qr "$D"/htdocs/luci-static/$N/* "$R":/www/luci-static/$N/
|
||||
|
||||
# EVERY resource JS, by GLOB — never by name. This used to list the four files
|
||||
@@ -41,17 +41,27 @@ tar -C "$D/htdocs/luci-static/resources" -cf - . | ssh "$R" "mkdir -p /www/luci-
|
||||
# Build/Prepare) so the Footstrap tab shows a real version instead of "(dev)". The FILE NAME is part
|
||||
# of the contract: FS_VERSION lives in fs-version.js and moving it means changing every sed.
|
||||
FS_V="$(git -C "$D" describe --tags --always 2>/dev/null | sed 's/^v//')"
|
||||
# if-form, not `[ -n ] && ssh`: under set -e a failed &&-list aborts the whole sync when git
|
||||
# describe yields nothing (a copied tree without .git). expr refuses a tag with
|
||||
# sed/shell-special characters rather than interpolating it.
|
||||
# if-form, not `[ -n ] && ssh`: under `set -e` a bare `&&`-list whose LAST command fails is what
|
||||
# aborts, so `[ -n "$FS_V" ] && ssh …` would take the sync down whenever git describe yielded
|
||||
# nothing (a copied tree without .git). An `&&` used to guard an ASSIGNMENT is a different shape and
|
||||
# is safe — stage.sh:41 and update-po.sh:39 rely on that. expr refuses a tag with sed/shell-special
|
||||
# characters rather than interpolating it.
|
||||
if [ -n "$FS_V" ] && expr "$FS_V" : '[0-9A-Za-z._-]*$' >/dev/null; then
|
||||
ssh "$R" "sed -i \"s#const FS_VERSION *= *'[^']*'#const FS_VERSION = '$FS_V'#\" /www/luci-static/resources/fs-version.js"
|
||||
fi
|
||||
|
||||
# The catalogue, which the PACKAGE compiles in Build/Prepare. po2lmo is a luci-base host tool,
|
||||
# absent from a dev machine by default, so this is best-effort: without it the strings stay
|
||||
# English and the sync still succeeds. (Build it once from the pinned luci commit: cc -o po2lmo
|
||||
# po2lmo.c lib/lmo.c lib/plural_formula.c.) Same basename as the package — see the Makefile.
|
||||
# The catalogue. Nothing in Build/Prepare compiles it, and the RELEASE does not come from luci.mk
|
||||
# either: owfeed bundles the catalogues inside the theme package (owfeed.yml), so a dev router gets
|
||||
# them from nowhere unless this sync makes them. po2lmo is a luci-base host tool, absent from a dev
|
||||
# machine by default, so this is best-effort: without it the strings stay English and the sync still
|
||||
# succeeds. (Build it once from the pinned luci checkout: make -C modules/luci-base/src po2lmo —
|
||||
# plural_formula.c is GENERATED by contrib/lemon, so a bare cc over the .c files cannot work.)
|
||||
#
|
||||
# THE BASENAME IS `footstrap-theme`, matching owfeed.yml and NOT the po file's own name: lmo_load_
|
||||
# catalog globs *.<lang>.lmo so any basename loads, and a v0.8.4 router still owns footstrap.ru.lmo
|
||||
# through the old luci-i18n package, where the same path would be a file conflict. Sync under a
|
||||
# different name and the dev router carries two archives for the same msgids, with glob order
|
||||
# deciding which one the page shows.
|
||||
if command -v po2lmo >/dev/null 2>&1; then
|
||||
ssh "$R" "mkdir -p /usr/lib/lua/luci/i18n"
|
||||
for po in "$D"/po/*/*.po; do
|
||||
|
||||
Reference in new issue
Block a user