summaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-13 20:48:13 +0200
committerPaul Buetow <paul@buetow.org>2026-02-13 20:48:13 +0200
commitbd095a1b9a2027a1ff43fe4b6fa04d0354ca062c (patch)
treeed4c8fad86c1b8347cc86020e0793822ae76a788 /justfile
parent20e3db5bcb04bc57377432126404b5e99d0b0a92 (diff)
Convert POD documentation to Markdown and migrate to Justfile
- Convert all POD files to Markdown format - Replace Makefile with justfile for build automation - Remove deprecated Debian packaging files and related directories - Update copyright year from 2013 to 2026 in Constants.pm and loadbars - Remove obsolete docs directory (bugs, wishlist, and generated files) - Fix sum() function in Utils.pm to handle undef values properly
Diffstat (limited to 'justfile')
-rw-r--r--justfile61
1 files changed, 61 insertions, 0 deletions
diff --git a/justfile b/justfile
new file mode 100644
index 0000000..d8e117a
--- /dev/null
+++ b/justfile
@@ -0,0 +1,61 @@
+NAME := "loadbars"
+VERSION := "0.7.5"
+
+default: version documentation perltidy
+
+version:
+ echo {{VERSION}} > .version
+
+profile:
+ perl -d:NYTProf loadbars --hosts localhost
+ nytprofhtml nytprof.out
+
+perltidy:
+ find . -name \*.pm | xargs perltidy -b
+ perltidy -b {{NAME}}
+ find . -name \*.bak -delete
+
+documentation:
+ pandoc --standalone --to man ./README.md --metadata title="loadbars" --metadata section="1" --metadata date="$(date +%Y-%m-%d)" > ./docs/{{NAME}}.1
+ pandoc --from markdown --to plain ./README.md > ./docs/{{NAME}}.txt
+
+install DESTDIR="":
+ #!/usr/bin/env bash
+ if [ ! -d "{{DESTDIR}}/usr/bin" ]; then
+ mkdir -p {{DESTDIR}}/usr/bin
+ fi
+ if [ ! -d "{{DESTDIR}}/usr/share/{{NAME}}" ]; then
+ mkdir -p {{DESTDIR}}/usr/share/{{NAME}}
+ fi
+ cp {{NAME}} {{DESTDIR}}/usr/bin
+ cp -r ./lib {{DESTDIR}}/usr/share/{{NAME}}/lib
+ cp -r ./fonts {{DESTDIR}}/usr/share/{{NAME}}/fonts
+ cp ./.version {{DESTDIR}}/usr/share/{{NAME}}/version
+
+deinstall DESTDIR="":
+ #!/usr/bin/env bash
+ if [ -n "{{DESTDIR}}" ] && [ -f "{{DESTDIR}}/usr/bin/{{NAME}}" ]; then
+ rm {{DESTDIR}}/usr/bin/{{NAME}}
+ fi
+ if [ -n "{{DESTDIR}}" ] && [ -d "{{DESTDIR}}/usr/share/{{NAME}}" ]; then
+ rm -r {{DESTDIR}}/usr/share/{{NAME}}
+ fi
+
+clean:
+ #!/usr/bin/env bash
+ if [ -f nytprof.out ]; then
+ rm nytprof.out
+ fi
+ if [ -f tmon.out ]; then
+ rm tmon.out
+ fi
+ if [ -d nytprof ]; then
+ rm -Rf nytprof
+ fi
+
+release: version documentation perltidy
+ git add -A
+ git commit -m 'New release {{VERSION}}'
+ git tag {{VERSION}}
+ git push --tags
+ git push origin master