Skip to content

Commit 8531fcd

Browse files
committed
fix: use env_var() in data justfile for proper variable passing
The data justfile referenced APPID as a bare justfile variable, which is undefined when invoked as a sub-justfile. Use env_var() to read from the exported environment variable instead, matching the cosmic-launcher pattern. Also export INSTALL_DIR from root.
1 parent 9c2c1ea commit 8531fcd

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

data/justfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
rootdir := ''
2-
prefix := '/usr'
1+
appid := env_var('APPID')
2+
install-dir := env_var('INSTALL_DIR')
33

4-
base-dir := absolute_path(clean(rootdir / prefix))
4+
desktop-src := appid + '.desktop'
5+
desktop-dst := install-dir / 'applications' / desktop-src
56

6-
desktop := APPID + '.desktop'
7-
desktop-src := APPID + '.desktop'
8-
desktop-dst := clean(rootdir / prefix) / 'share' / 'applications' / desktop
9-
10-
icon := APPID + '.svg'
11-
icon-src := 'icons' / icon
12-
icon-dst := clean(rootdir / prefix) / 'share' / 'icons' / 'hicolor' / 'scalable' / 'apps' / icon
7+
icon-src := 'icons' / appid + '.svg'
8+
icon-dst := install-dir / 'icons' / 'hicolor' / 'scalable' / 'apps' / appid + '.svg'
139

1410
install:
1511
install -Dm0644 {{desktop-src}} {{desktop-dst}}

justfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ prefix := '/usr'
66

77
base-dir := absolute_path(clean(rootdir / prefix))
88

9+
export INSTALL_DIR := base-dir / 'share'
10+
911
cargo-target-dir := env('CARGO_TARGET_DIR', 'target')
1012
bin-src := cargo-target-dir / 'release' / name
1113
bin-dst := base-dir / 'bin' / name

0 commit comments

Comments
 (0)