jukebox
All repositories: gitoria
2.7 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 (c96709c); retain virtual list# 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="c96709c" ;;virtual-list/*) ref="46d90ec" ;;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 46d90ec; media-player c96709c (${#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 '46d90ec virtual-list from components.hybriel\n46fefaa icons from components.hybriel\nc96709c media-player from components.hybriel (skip and repeat options)\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 "c96709c:components/$f" > "$APP/components/$f"doneecho "copied 2 icon files from components.hybriel $REF and 2 media-player files from c96709c; retained virtual list""$0" --check
Branches
Latest commits
- d18851fdjb19: pressed switches look different (whole selector), queue column cannot widen past the panel, gates follow the new bar (jb3, jb11, jb15)mre
- 82b54c0ejb19: bar Shuffle · Previous · Play · Next · Repeat, no 10 s buttons; Shuffle switch (shuffle from the playing song, back to the list), Repeat off/all/one, both remembered in ui.json; Shuffle my favourites an ordinary button; gate tests/jb19.mjsmre
- ba354710jb19: icons pinned to components.hybriel 46fefaa (shuffle, repeat, repeatOne, prevTrack, nextTrack)mre
- d8e8d059jb19 step 2: media-player from components.hybriel c96709c (skip, repeat options; the end of a song only calls onPlay), sync-components.sh and SOURCE point to it, jb11 counts media loads and metadata writes (from jb21 d3a026e)mre
- 7b048c1bRecords: jb19 done, L2 live stepmre
- 665185aeMission 009: jb19 livemre
- 47b2d3beRecords: P1 resumedmre
- 8e326e94Records: resetKey blockedmre
- f72dd7edRecords: icons comingmre
- b264e5deRecords: P1 icons stopmre
- 514d7cbeRecords: mission 008 startedmre
- 61c40127Mission 008: #19 + #21mre
- 6dcaeb46Records: resetKey planmre
- c5dbf2ecRecords: R2 resultmre
- 956069b8Records: R1 result, mission 007mre
- 3c8a2e12Mission 007: #20 sort scrollmre
- deb8cef5Records: mission 006 startedmre
- 4f0ad42fMission 006: jukebox#20mre
- 800cae06Records: #21 planmre
- 64bc7823Records: #21 causemre