gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitab22bdc2ab22bdc2mail-demo: nest child and compound selectors in Stylemreab22bdc2/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

  • 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
  • 3e389b83main-menu: nest child and compound selectors in Stylemre
  • 05413975list-first: nest child and compound selectors in Stylemre
  • c545b642content-first: nest child and compound selectors in Stylemre
  • eae2be7aapp-sidebar: nest child selectors and document caller-slot gapmre
  • 69c9f784Record LY7 slot nesting blocker and minimal repromre
  • b1d4f379app-header: nest child and compound selectors in Stylemre
  • 6385ff8eRecord LY7 style formatting proof and review statusmre
  • 0100f51etracker-demo: format Style with nested rules and bare mediamre
  • 5f82554enotes-demo: format Style with nested rules and bare mediamre
  • 3dc27d78mail-demo: format Style with nested rules and bare mediamre
  • cf9648afhome: format Style with nested rules and bare mediamre
  • 846a6242user-menu: format Style with nested rules and bare mediamre
  • 4d58708cthree-pane: format Style with nested rules and bare mediamre
  • 0bbfc553main-menu: format Style with nested rules and bare mediamre
  • 7755199dlist-first: format Style with nested rules and bare mediamre
  • 35199303content-first: format Style with nested rules and bare mediamre