diff --git a/justfile b/justfile index 2fe115c..7f8dc27 100644 --- a/justfile +++ b/justfile @@ -21,6 +21,19 @@ prove: # Install Orbit to ~/.local/bin and set up its package PATH for Bash. install: build install -Dm755 _build/native/release/build/main/main.exe "$HOME/.local/bin/orbit" + @just _path + +# Build without optimisation (much faster to compile than `build`). +build-debug: + moon build --target native + +# Install the unoptimised build to ~/.local/bin, for trying out a change. +install-debug: build-debug + install -Dm755 _build/native/debug/build/main/main.exe "$HOME/.local/bin/orbit" + @just _path + +# Add Orbit's package bin directory to PATH in ~/.bashrc, once. +_path: @line='export PATH="${ORBIT_ROOT:-$HOME/.orbit}/bin:$PATH"'; rc="$HOME/.bashrc"; \ if [ ! -f "$rc" ] || ! grep -Fqx -- "$line" "$rc"; then \ printf '\n%s\n' "$line" >> "$rc"; \