# Justfile for bibiman # Installation directories PREFIX := "/usr/local" MANDIR := PREFIX + "/man" BINDIR := PREFIX + "/bin" # Default recipe default: build # Build the binary in release mode build: cargo build --release # Development build dev: cargo build # Run the binary in development mode run: dev cargo run # Install the binary and man pages # Note: Requires sudo when installing to system directories install: build #!/usr/bin/env sh set -eu install -D target/release/bibiman "${DESTDIR:-}"{{BINDIR}}/bibiman install -D man/bibiman.1 "${DESTDIR:-}"{{MANDIR}}/man1/bibiman.1 install -D man/bibiman.toml.5 "${DESTDIR:-}"{{MANDIR}}/man5/bibiman.toml.5 echo "Installation complete. Run 'sudo mandb' to update man page database if needed." # Install only man pages # Note: Requires sudo when installing to system directories install-man: #!/usr/bin/env sh set -eu install -D man/bibiman.1 "${DESTDIR:-}"{{MANDIR}}/man1/bibiman.1 install -D man/bibiman.toml.5 "${DESTDIR:-}"{{MANDIR}}/man5/bibiman.toml.5 echo "Man pages installed. Run 'sudo mandb' to update man page database if needed." # Uninstall uninstall: #!/usr/bin/env sh set -eu rm -f "${DESTDIR:-}"{{BINDIR}}/bibiman rm -f "${DESTDIR:-}"{{MANDIR}}/man1/bibiman.1 rm -f "${DESTDIR:-}"{{MANDIR}}/man5/bibiman.toml.5 # Clean build artifacts clean: cargo clean # Run tests test: cargo test # Format code fmt: cargo fmt --all # Run clippy lints clippy: cargo clippy -- -D warnings # Check the code check: cargo check # Build and run with test files test-run: dev cargo run -- tests/biblatex-test.bib # Show available recipes list: just --list