mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 05:23:56 +08:00
This commit is contained in:
1 parent
f99c0304cd
commit
410d762592
154 files changed
+9225
-8782
No files matched your search
@@ -43,25 +43,22 @@ tar -C "$D/htdocs/luci-static/resources" -cf - . | ssh "$R" "mkdir -p /www/luci-
|
||||
FS_V="$(git -C "$D" describe --tags --always 2>/dev/null | sed 's/^v//')"
|
||||
# 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.
|
||||
# nothing (a copied tree without .git). An `&&` guarding an ASSIGNMENT is a different shape and is
|
||||
# safe. expr refuses a tag with sed- or 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. 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
|
||||
# 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 — 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.
|
||||
# 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 is a file conflict.
|
||||
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
|
||||
@@ -106,22 +103,21 @@ done
|
||||
ssh "$R" "/etc/init.d/rpcd reload 2>/dev/null; rm -f /tmp/luci-indexcache*"
|
||||
|
||||
ssh "$R" "
|
||||
# Sweep every pre-consolidation name, INCLUDING $N-top: the top bar is not a theme any more,
|
||||
# so a stale mediaurlbase pointing at its media dir would still render a theme LuCI no longer
|
||||
# lists.
|
||||
# Sweep every pre-consolidation name, including $N-top: the top bar is not a theme any more, so a
|
||||
# stale mediaurlbase pointing at its media dir would still render a theme LuCI no longer lists.
|
||||
#
|
||||
# rm -rf, not rm -f: these are DIRECTORIES (and $N-top a SYMLINK to one, which rm -rf removes
|
||||
# as the link, not its target). \`rm -f\` refuses a directory, 2>/dev/null swallowed the error
|
||||
# and this block runs without set -e — so the sweep silently did nothing. Every path is a
|
||||
# literal built from \$N: no glob, no user input.
|
||||
# rm -rf, not rm -f: these are DIRECTORIES (and $N-top a symlink to one, which rm -rf removes as the
|
||||
# link rather than its target). \`rm -f\` refuses a directory, 2>/dev/null swallows the error, and
|
||||
# this block runs without set -e — so the sweep silently does nothing. Every path is a literal built
|
||||
# from \$N: no glob, no user input.
|
||||
cd /www/luci-static
|
||||
rm -rf $N/$N $N-top $N-dark $N-light $N-top-dark $N-top-light
|
||||
cd /usr/share/ucode/luci/template/themes
|
||||
rm -rf $N/$N $N-top $N-dark $N-light $N-top-dark $N-top-light
|
||||
# The overview layout used to install into luci-mod-status's GLOBAL include dir, where LuCI loads
|
||||
# every *.js under any theme. It is a chrome module (fs-overview.js) now. A package upgrade drops
|
||||
# the old file; dev-sync copies rather than installs, so it has to be swept by name — otherwise the
|
||||
# dev router keeps running BOTH copies and the grid is arranged twice.
|
||||
# The overview layout must not be left in luci-mod-status's global include dir, where LuCI loads
|
||||
# every *.js under any theme: it is a chrome module now. A package upgrade drops the old file, but
|
||||
# dev-sync copies rather than installs, so it has to be swept by name — otherwise the dev router
|
||||
# runs both copies and the grid is arranged twice.
|
||||
rm -f /www/luci-static/resources/view/status/include/05_footstrap_overview_layout.js
|
||||
for db in /lib/apk/db/installed /usr/lib/opkg/status; do [ -f \"\$db\" ] && touch \"\$db\"; done
|
||||
rm -f /tmp/luci-indexcache*"
|
||||
@@ -133,18 +129,16 @@ scp -q "$D"/root/etc/uci-defaults/30_luci-theme-footstrap "$R":/tmp/30_luci-them
|
||||
ssh "$R" "PKG_UPGRADE=1 sh /tmp/30_luci-theme-footstrap; rm -f /tmp/30_luci-theme-footstrap /tmp/luci-indexcache*"
|
||||
|
||||
|
||||
# ---- BUST THE BROWSER CACHE, or a dev deploy is invisible to the device you are testing on ----
|
||||
# ---- bust the browser cache, or a dev deploy is invisible to the device you are testing on ----
|
||||
#
|
||||
# head.ut versions every asset with `?v={{ pkgs_update_time }}`, and luci-base derives that from the
|
||||
# mtime of the PACKAGE DATABASE (runtime.uc: /lib/apk/db/installed, falling back to
|
||||
# /usr/lib/opkg/status). Installing a package moves it; scp'ing files over an existing install does
|
||||
# not — so a dev deploy leaves the URL identical while the bytes underneath change, and a browser is
|
||||
# entitled to keep serving what it already has. On a phone that is not a theory: a whole afternoon of
|
||||
# "still shakes" reports were taken against a stylesheet several deploys old.
|
||||
# mtime of the PACKAGE DATABASE. Installing a package moves it; scp'ing files over an existing
|
||||
# install does not — so a dev deploy leaves the URL identical while the bytes change, and a browser
|
||||
# is entitled to keep serving what it has. On a phone that is not a theory: an afternoon of "still
|
||||
# shakes" reports were taken against a stylesheet several deploys old.
|
||||
#
|
||||
# Touching the database file is what an install would have done to it, so the next page carries a new
|
||||
# `?v=` for every asset and nothing can be stale. Router-only, dev-only: nothing in the package does
|
||||
# this.
|
||||
# Touching the database file is what an install would have done to it, so the next page carries a
|
||||
# new `?v=` for every asset. Router-only, dev-only: nothing in the package does this.
|
||||
ssh "$R" 'touch /lib/apk/db/installed 2>/dev/null || touch /usr/lib/opkg/status 2>/dev/null || true'
|
||||
|
||||
echo "synced to $R (single Footstrap theme registered, active theme unchanged)"
|
||||
Reference in new issue
Block a user