-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
41 lines (29 loc) · 982 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
39
40
41
rootdir := ''
prefix := '/usr'
debug := '0'
export NAME := 'cosmic-ext-applet-netspeed'
export APPID := 'io.github.khanra17.' + NAME
cargo-target-dir := env('CARGO_TARGET_DIR', 'target')
bin-src := cargo-target-dir / if debug == '1' { 'debug' / NAME } else { 'release' / NAME }
base-dir := absolute_path(clean(rootdir / prefix))
share-dst := base-dir / 'share'
bin-dst := base-dir / 'bin' / NAME
desktop-dst := share-dst / 'applications' / APPID + '.desktop'
icon-dst := share-dst / 'icons/hicolor/scalable/apps' / APPID + '-symbolic.svg'
default: build-release
build-debug *args:
cargo build {{args}}
build-release *args:
cargo build --release {{args}}
install:
install -Dm0755 {{bin-src}} {{bin-dst}}
install -Dm0644 res/desktop_entry.desktop {{desktop-dst}}
install -Dm0644 res/app_icon.svg {{icon-dst}}
uninstall:
rm {{bin-dst}}
rm {{desktop-dst}}
rm {{icon-dst}}
clean:
cargo clean
run:
flatpak run io.github.khanra17.cosmic-ext-applet-netspeed