Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.6 kB · 39 lines
12345678910111213141516171819202122232425262728293031323334353637383940#!/bin/sh# juke-wizard/bin/jukewizard — build (cached) + launch JukeWizard.## JukeWizard is the MASTER JUKE: it ALWAYS loads the whole /pop library so# every track is visible. Open it with no args to browse, or pass a specific# track to jump straight to it — the full library still loads underneath.## usage:# juke-wizard/bin/jukewizard # browse the whole /pop library# juke-wizard/bin/jukewizard <file.mp3> # load library + select/play that track# juke-wizard/bin/jukewizard <folder | playlist> # load library + add these too# juke-wizard/bin/jukewizard ... --watch <dir> # auto-pop new renders## Runs from anywhere; resolves the package from its own location.set -eHERE="$(cd "$(dirname "$0")" && pwd)"WIZ="$HERE/.."REPO="$(cd "$WIZ/.." && pwd)"swift build -c release --package-path "$WIZ" 2>&1 | grep -v '^$' | tail -2 || trueBIN="$WIZ/.build/release/JukeWizard"LIB="$REPO/pop/out/pop-library.json"node "$REPO/pop/bin/pop-library.mjs" >/dev/null 2>&1 || true # refresh the index# No args → just the master library.if [ "$#" -eq 0 ]; then exec "$BIN" "$LIB"fi# A specific audio file → load the master library AND select/play it# (absolutized so it matches the library entry; added to the queue if it's a# fresh draft not in the index yet).if [ -f "$1" ]; then case "$1" in /*) SEL="$1";; *) SEL="$(pwd)/$1";; esac exec "$BIN" "$LIB" "$@" --select "$SEL"fi# A folder / playlist / flags → load the master library and add them too.exec "$BIN" "$LIB" "$@"