-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
38 lines (29 loc) · 1021 Bytes
/
justfile
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
export prefix := "/usr/local"
export config_system := if clean(prefix) == "/usr" {
"/etc"
} else if clean(prefix) == "/" {
"/etc"
} else {
"/usr/local/etc"
}
export config_user := env("XDG_CONFIG_HOME", join(env("HOME"), ".config"))
set shell := ["sh", "-xc"]
default:
@just --choose
build *args="":
cargo build {{args}}
dups:
rg '.*"(.*) (.*)".*' -r '$1 v$2' Cargo.lock | sort -u
install: (build "--release")
install -v -D target/release/libmpv_mpris2.so "${prefix}/lib/mpv-mpris2/mpris.so"
strip --strip-unneeded "${prefix}/lib/mpv-mpris2/mpris.so"
mkdir -p "${config_system}/mpv/scripts/"
ln -v -s -t "${config_system}/mpv/scripts/" "${prefix}/lib/mpv-mpris2/mpris.so"
uninstall:
rm "${config_system}/mpv/scripts/mpris.so"
rm -rf "${prefix}/lib/mpv-mpris2/"
install-user: (build "--release")
install -v -D target/release/libmpv_mpris2.so "${config_user}/mpv/scripts/mpris.so"
strip --strip-unneeded "${config_user}/mpv/scripts/mpris.so"
uninstall-user:
rm "${config_user}/mpv/scripts/mpris.so"