-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
46 lines (33 loc) · 1.41 KB
/
justfile
File metadata and controls
46 lines (33 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
PREFIX := "/usr/local"
BINDIR := PREFIX / "bin"
LIBEXECDIR := PREFIX / "libexec"
DATADIR := PREFIX / "share"
USRLIBDIR := PREFIX / "lib"
# systemd unit load paths
# defaults to /etc, but can be overridden by setting SYSTEMD_UNITDIR to a different path
# usually /usr/lib/systemd/system
SYSTEMD_UNITDIR := "/etc"
build: build_agent build_cli
build_agent:
cargo build --release -p odorobo-agent
build_cli:
cargo build --release -p odoroboctl
build_agent_debug:
cargo build -p odorobo-agent
debug: build_agent_debug
sudo target/debug/odorobo-agent
install: install_script install_unit install_agent install_cli
install_script:
install -Dm755 systemd/scripts/odorobo-preflight {{ LIBEXECDIR }}/odorobo-preflight
install -Dm755 systemd/scripts/odorobo-postflight {{ LIBEXECDIR }}/odorobo-postflight
install -Dm755 systemd/scripts/odorobo-cleanup {{ LIBEXECDIR }}/odorobo-cleanup
install_unit:
install -Dm644 systemd/[email protected] {{ SYSTEMD_UNITDIR }}/systemd/system/[email protected]
install -Dm644 systemd/odorobo-agent.service {{ SYSTEMD_UNITDIR }}/systemd/system/odorobo-agent.service
systemctl daemon-reload || true
install_agent:
install -Dm755 target/release/odorobo-agent {{ BINDIR }}/odorobo-agent
install_cli:
install -Dm755 target/release/odoroboctl {{ BINDIR }}/odoroboctl
install_agent_debug:
install -Dm755 target/debug/odorobo-agent {{ BINDIR }}/odorobo-agent