jukebox
All repositories: gitoria
2.9 KB
#!/usr/bin/env bash# tools/sync-components.sh — copy the components.hybriel.worldapi.org blocks jukebox uses, BYTE-VERBATIM from a commit# (mission JB2; the model is layouts.worldapi.org's tools/sync-components.sh).# tools/sync-components.sh [46fefaa] copy pinned icons and the player (51c3818); virtual list e5b98ec# tools/sync-components.sh --check compare the copies with the commit in components/SOURCE (exit 1 on any difference)# Source repo: $COMPONENTS_REPO (default loreana /media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org). The files come out of# git (`git show <commit>:<path>`), not the working tree, so uncommitted edits there never land here. Never edit the copies:# change them in components.hybriel, commit there, run this, then the gates (README "Files").set -euo pipefailAPP="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"SRC="${COMPONENTS_REPO:-/media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org}"# what is copied: the media player, the virtual list and the icons: each block own file + README (no demo.hl).FILES=(media-player/media-player.hl media-player/README.mdvirtual-list/virtual-list.hl virtual-list/README.mdicons/icons.hl icons/README.md)# a git worktree has a .git FILE, a clone a .git directory: either is a repo[ -e "$SRC/.git" ] || { echo "no git repo at $SRC (set COMPONENTS_REPO)"; exit 2; }if [ "${1:-}" = "--check" ]; thenREF="$(head -n1 "$APP/components/SOURCE" | cut -d' ' -f1)"bad=0for f in "${FILES[@]}"; dorepo="$SRC"ref="$REF"case "$f" inicons/*) ref="46fefaa" ;;media-player/*) ref="51c3818" ;;virtual-list/*) ref="e5b98ec" ;;esacif ! git -C "$repo" show "$ref:components/$f" | cmp -s - "$APP/components/$f"; then echo "DIFFERS: components/$f (vs $ref)"; bad=1; fidone[ $bad = 0 ] && echo "verbatim: icons 46fefaa; virtual-list e5b98ec; media-player 51c3818 (${#FILES[@]} files)"exit $badfiREF="$(git -C "$SRC" rev-parse --short "${1:-46fefaa}^{commit}")"[ "$REF" = "46fefaa" ] || { echo "icons are pinned to 46fefaa; update the provenance check before changing the pin"; exit 2; }for f in icons/icons.hl icons/README.md; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "$REF:components/$f" > "$APP/components/$f"doneprintf 'e5b98ec virtual-list from components.hybriel\n46fefaa icons from components.hybriel\n51c3818 media-player from components.hybriel (autoplay mount fix, day72)\n' > "$APP/components/SOURCE"for f in media-player/media-player.hl media-player/README.md; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "51c3818:components/$f" > "$APP/components/$f"donefor f in virtual-list/virtual-list.hl virtual-list/README.md; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "e5b98ec:components/$f" > "$APP/components/$f"doneecho "copied 2 icon files from components.hybriel $REF, 2 media-player files from 51c3818 and 2 virtual-list files from e5b98ec""$0" --check
Branches
Latest commits
- 10f8a8c8Merge branch 'code-order' into mainJukebox
- 204fc828Merge branch 'day72' into mainJukebox
- 95f5faae|||PR jukebox#7 Drop needless let declarationsmre
- 33072bb5|||PR Record day72 gates and Chrome proofmre
- 95f2cd73|||PR Use typed parent methods for screen playback and local server facesmre
- 6422a020Sync media-player at 51c3818mre
- b582ba1cVendor complete Hybriel day72 plugin setmre
- 02dccbc9Merge branch 'records-1119' into mainJukebox
- a39e1c23|||PR Records: missions 013-015, reconnect fix livemre
- fc7db075Merge branch 'reconnect-retry' into mainJukebox
- ac6f4c6fL2: plain declaration for a in pickedNextmre
- 2f335086Review round 2: only an explicit queue pick drops pend (not the automatic advance); jb23 records every source changemre
- 3eb6695fReview fixes: action generation, queue pick clears pend, Previous/Next retry the decided request, typed handlersmre
- 7a53c0c2|||PR A tap lost to a dead socket plays after reconnect (mission 015)mre
- 1f0cd77bMerge branch 'records-day41' into mainJukebox
- 67be229f|||PR Records: day41 live (PR #4), mission 012, statusmre
- 0bb027daconductor: caramboleyo is the user, not owner/creatorApollo
- 04f5d9d5Merge branch 'day41' into mainJukebox
- 8ed6da45|||PR README: media-player pin df9e7dfmre
- d5d45fc3|||PR media-player df9e7df (repeat-one fix), sync pin and SOURCEmre