From 9430ca5109fbb9620f7c47978b758bd564ec67d7 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 9 Dec 2023 07:29:44 -1000 Subject: [PATCH] just: port INSTALLING make rules --- justfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 95469b58d..14649f3a1 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ # * Light project scripts, without file dependendencies, using https://github.com/casey/just. # https://docs.rs/regex/1.5.4/regex/#syntax Regexps # https://just.systems/man/en/chapter_31.html Functions -# See also Makefile, Shake.hs +# See also Makefile, Shake.hs.. @help: just -lu @@ -125,6 +125,23 @@ _gitSwitchAutoCreate BRANCH: git switch -c {{ BRANCH }} fi +# ** installing + +STACK := 'stack' + +# stack install, then move the hledger executables to bin/old/hledger*-VER +@install-as VER: + {{ STACK }} install --local-bin-path bin/old + for e in hledger hledger-ui hledger-web ; do mv bin/old/$e bin/old/$e-{{ VER }}; echo "bin/$e-{{ VER }}"; done + +# copy the hledger executables from ~/.local/bin to bin/old/hledger*-VER +@copy-as VER: + for e in hledger hledger-ui hledger-web ; do cp ~/.local/bin/$e bin/old/$e-{{ VER }}; echo "bin/$e-{{ VER }}"; done + +# copy just the hledger executable from ~/.local/bin to bin/old/hledger-VER +copy1-as VER: + cp ~/.local/bin/hledger bin/old/hledger-{{ VER }}; echo "bin/hledger-{{ VER }}" + # ** misc # Show last week's activity, for TWIH