just: port INSTALLING make rules

This commit is contained in:
Simon Michael 2023-12-09 07:29:44 -10:00
parent d1ca270063
commit 9430ca5109

View File

@ -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