gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitce4a0baece4a0baeKeep caller slot styles whole so minimal shell apps startmrece4a0bae/tools/usage.sh

1.8 KB

  1. #!/usr/bin/env bash
  2. # usage.sh — which app carries which shared piece, and is its copy the same as the source?
  3. # Sources: components → components.hybriel.worldapi.org/components/<name>/<name>.hl,
  4. # theme → layouts.worldapi.org/theme/, tokens → layouts.worldapi.org/shared/tokens.hl,
  5. # md-editor.js (old JS editor, to be retired) → worldapi-components/md-editor.js.
  6. # States: same = byte-identical to the source · DIFFERS = copy is behind/ahead or patched · fork = declared own copy
  7. # (listed in docs/usage.md "Forks"). Run: tools/usage.sh [projects dir] — exit 1 if any copy DIFFERS.
  8. P=${1:-$(cd "$(dirname "$0")/../.." && pwd)}
  9. LIB=$P/components.hybriel.worldapi.org/components; LAY=$P/layouts.worldapi.org
  10. APPS="tickets ident gitoria notes calendar tracker layouts"
  11. FORKS=" calendar:month-view "
  12. bad=0
  13. cmpf() { if cmp -s "$1" "$2"; then echo same; else echo DIFFERS; fi; }
  14. for a in $APPS; do
  15. d=$P/$a.worldapi.org; line=""
  16. for c in $(ls "$LIB" | grep -v '\.hl$'); do
  17. f=$(find "$d/components" -path '*/showcase' -prune -o -name "$c.hl" -print 2>/dev/null | head -1)
  18. [ -z "$f" ] && continue
  19. s=$(cmpf "$f" "$LIB/$c/$c.hl"); [[ $FORKS == *" $a:$c "* ]] && s=fork
  20. [ $s = DIFFERS ] && bad=1; line+=" $c=$s"
  21. done
  22. if [ -d "$d/theme" ] && [ $a != layouts ]; then
  23. if diff -rq "$d/theme" "$LAY/theme" >/dev/null; then line+=" theme=same"; else line+=" theme=DIFFERS"; bad=1; fi
  24. fi
  25. [ -f "$d/shared/tokens.hl" ] && { s=$(cmpf "$d/shared/tokens.hl" "$LAY/shared/tokens.hl"); [ $s = DIFFERS ] && bad=1; line+=" tokens=$s"; }
  26. [ -f "$d/shared/md-editor.js" ] && { s=$(cmpf "$d/shared/md-editor.js" "$P/worldapi-components/md-editor.js"); line+=" md-editor.js(old)=$s"; }
  27. echo "$a:$line"
  28. done
  29. echo "sources: components.hybriel $(git -C "$P/components.hybriel.worldapi.org" log -1 --format=%h) · layouts $(git -C "$LAY" log -1 --format=%h)"
  30. exit $bad

Branches

Latest commits

  • ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
  • 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
  • b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
  • ebd00b6cNest caller slot styles in three-panemre
  • 009991efNest caller slot styles in list-firstmre
  • 494d75d4Nest caller slot styles in app-sidebarmre
  • e5571680Align all plugin sources with Hybriel day38bmre
  • 5d204c46Re-vendor layouts to Hybriel set day38bmre
  • 17e0f03eNest html-prefixed theme component overridesmre
  • e54e735eFormat plain theme elements with nested rules and bare mediamre
  • 547f834eRecord LY7 deployment and live verificationmre
  • fa4600b1Link caller-slot style exceptions to hybriel#270mre
  • 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
  • b810453etracker-demo: nest child and compound selectors in Stylemre
  • 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
  • ab22bdc2mail-demo: nest child and compound selectors in Stylemre
  • fe2d8de9home: nest child and compound selectors in Stylemre
  • e631791buser-menu: nest child and compound selectors in Stylemre
  • 69604944three-pane: nest child and compound selectors in Stylemre