-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (18 loc) · 689 Bytes
/
Makefile
File metadata and controls
21 lines (18 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.POSIX:
BIN = target/release/workspaces
$(BIN): src/main.rs src/cli.rs src/config.rs src/zfs.rs
cargo build --release
install: $(BIN)
# install binary
install -D -m 4755 $(BIN) /usr/local/bin/workspaces
test -e /usr/bin/workspaces || ln -s /usr/local/bin/workspaces /usr/bin/workspaces
# copy config
mkdir -p /etc/workspaces
cp workspaces.toml /etc/workspaces/workspaces.example.toml
test -e /etc/workspaces/workspaces.toml || cp workspaces.toml /etc/workspaces/
# make database dir
mkdir -p /usr/local/lib/workspaces
# install systemd service / timer
cp clean-workspaces.service /etc/systemd/system/
cp clean-workspaces.timer /etc/systemd/system/
systemctl daemon-reload