diff justfile @ 7:8e4813b4e509

update index style + justfile additions
author Atarwn Gard <a@qwa.su>
date Tue, 10 Mar 2026 12:12:33 +0500
parents 54ab94198677
children
line wrap: on
line diff
--- a/justfile	Tue Mar 10 10:22:02 2026 +0500
+++ b/justfile	Tue Mar 10 12:12:33 2026 +0500
@@ -1,7 +1,25 @@
+prefix := "/usr/local"
+bindir := prefix + "/bin"
+mandir := prefix + "/share/man"
+
 build: d2o man
 
 d2o:
-    go build .
+    go build -o d2o .
+
 man:
     lowdown -s -tman man/d2o.1.md -o d2o.1
-    lowdown -s -tman man/d2obase.5.md -o d2obase.5
\ No newline at end of file
+    lowdown -s -tman man/d2obase.5.md -o d2obase.5
+
+install: build
+    install -D -m 755 d2o {{bindir}}/d2o
+    install -D -m 644 d2o.1 {{mandir}}/man1/d2o.1
+    install -D -m 644 d2obase.5 {{mandir}}/man5/d2obase.5
+
+uninstall:
+    rm -f {{bindir}}/d2o
+    rm -f {{mandir}}/man1/d2o.1
+    rm -f {{mandir}}/man5/d2obase.5
+
+clean:
+    rm -f d2o d2o.1 d2obase.5
\ No newline at end of file