#!/bin/bash # sjel — the public command interface for a Sjel installation. `sjel` is a symlink to it. # # Launcher only. The commands moved into the sjel-cli crate on 2026-10-02: dispatch and help in # tools/sjel-cli/src/main.rs, `capability` in capability.rs, `search` in search.rs. This file # resolves the checkout it lives in, through any symlink such as ~/.local/bin/sjel, and execs # the binary with its arguments unchanged. # bash 3.2-safe (CONTRIBUTING.md#portable-shell). set -u SOURCE="${BASH_SOURCE[0]:-$0}" while [ -L "$SOURCE" ]; do DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" TARGET="$(readlink "$SOURCE")" case "$TARGET" in /*) SOURCE="$TARGET" ;; *) SOURCE="$DIR/$TARGET" ;; esac done SJEL_ROOT="$(cd -P "$(dirname "$SOURCE")" && pwd)" export SJEL_ROOT # shellcheck source=tools/lib/toml.sh . "$SJEL_ROOT/tools/lib/toml.sh" # toml_get_in, for the missing-cargo install hint # shellcheck source=tools/lib/sjel-cli.sh . "$SJEL_ROOT/tools/lib/sjel-cli.sh" sjel_cli_exec "$@"