#!/usr/bin/env just --justfile
NAME:='seehecht'
FANCY_NAME:=NAME+" 🐟"
INSTALL_PATH:="/usr"

# By default, recipes are only listed.
default:
	@just --list

# Compile and run.
run:
	@cargo run

# Compile.
build:
	@cargo build

# Uninstall for user only.
user-uninstall:
	@cargo uninstall seehecht
	@rm ~/.cargo/bin/seehecht

# Uninstall for user only. You can pass in the INSTALL_PATH variable.
system-uninstall:
	@cargo uninstall seehecht --root {{INSTALL_PATH}}
	@rm {{INSTALL_PATH}}/bin/seehecht

# Install for user only.
user-install:
	@cargo install --path .
	@ln -s ~/.cargo/bin/seh ~/.cargo/bin/seehecht

# Install systemwide by default. You can pass in the INSTALL_PATH variable.
system-install:
	@cargo install --path . --root {{INSTALL_PATH}}
	@ln -s {{INSTALL_PATH}}/bin/seh {{INSTALL_PATH}}/bin/seehecht

