generated from eblume/project-template
26 lines
855 B
Text
26 lines
855 B
Text
|
|
#!/usr/bin/env bash
|
||
|
|
#MISE description="Run a development hephd on isolated .dev/ paths (never touches the installed daemon's data)"
|
||
|
|
|
||
|
|
# Dev/installed isolation: the installed heph owns the default XDG socket+DB
|
||
|
|
# (your real data); this runs the dev working-tree daemon on a separate socket
|
||
|
|
# and DB under .dev/ (gitignored). Point a dev Neovim at it with:
|
||
|
|
#
|
||
|
|
# HEPH_SOCKET="$PWD/.dev/hephd.sock" HEPH_DB="$PWD/.dev/heph.db" nvim
|
||
|
|
#
|
||
|
|
# (the plugin reads those envs), so dev edits never reach the installed store.
|
||
|
|
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||
|
|
cd "$ROOT"
|
||
|
|
mkdir -p .dev
|
||
|
|
|
||
|
|
SOCK="$ROOT/.dev/hephd.sock"
|
||
|
|
DB="$ROOT/.dev/heph.db"
|
||
|
|
|
||
|
|
echo "dev hephd → socket $SOCK"
|
||
|
|
echo " db $DB"
|
||
|
|
echo "point a dev nvim at it: HEPH_SOCKET=$SOCK HEPH_DB=$DB nvim"
|
||
|
|
echo
|
||
|
|
|
||
|
|
exec cargo run -p hephd -- --mode local --socket "$SOCK" --db "$DB"
|