A modern, network-enabled music player platform built on Rockbox technology.
rockboxd.tsiry-sandratraina.com
rust
deno
navidrome
airplay
libadwaita
zig
mpris
snapcast
mpd
rockbox
audio
subsonic
1#!/usr/bin/env bash
2# Root launcher for the Rockbox Console (tools/console).
3#
4# Forwards to the babashka task surface so you can drive every
5# build / dev / ops command from the repo root instead of cd'ing in:
6#
7# ./console # command tour (bb help)
8# ./console build:all # firmware → crates → zig → rockboxd
9# ./console run:debug # RUST_LOG=debug rockboxd
10# ./console repl # rich terminal REPL (clj -M:rebel)
11# ./console nrepl # nREPL for your editor (clj -M:dev)
12#
13# Any other argument is passed straight through to `bb` in tools/console.
14set -euo pipefail
15
16# Resolve the directory this script lives in (repo root), following symlinks.
17SOURCE="${BASH_SOURCE[0]}"
18while [ -h "$SOURCE" ]; do
19 DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
20 SOURCE="$(readlink "$SOURCE")"
21 [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE"
22done
23ROOT="$(cd -P "$(dirname "$SOURCE")" && pwd)"
24CONSOLE_DIR="$ROOT/tools/console"
25
26if [ ! -d "$CONSOLE_DIR" ]; then
27 echo "console: tools/console not found at $CONSOLE_DIR" >&2
28 exit 1
29fi
30
31cd "$CONSOLE_DIR"
32
33# Versions (java / clojure / babashka) are pinned in tools/console/.mise.toml.
34# Prefer tools already on PATH; otherwise run them through mise.
35run() {
36 local tool="$1"; shift
37 if command -v "$tool" >/dev/null 2>&1; then
38 exec "$tool" "$@"
39 elif command -v mise >/dev/null 2>&1; then
40 exec mise exec -- "$tool" "$@"
41 else
42 echo "console: '$tool' not found and mise is unavailable." >&2
43 echo " run 'mise install' in tools/console, or install $tool manually." >&2
44 exit 1
45 fi
46}
47
48case "${1:-}" in
49 repl)
50 run clj -M:rebel
51 ;;
52 nrepl)
53 run clj -M:dev
54 ;;
55 "")
56 run bb help
57 ;;
58 *)
59 run bb "$@"
60 ;;
61esac