hard link git-annex to fix ./git-annex test

2fc46e1871 broke running ./git-annex test
when git-annex-shell is not in PATH from another install, and also
caused the wrong git-annex-shell to be tested.

Using a symlink made programPath return the .cabal/ directory where the
git-annex binary is, but git-annex-shell is not in that directory.
Changing to a hard link avoids that problem.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-03-07 14:01:45 -04:00
parent 5b6518d4a3
commit 9770fde5f4
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -57,12 +57,12 @@ dev:
git-annex: tmp/configure-stamp
$(BUILDER) build $(BUILDERCOMMONOPTIONS) $(BUILDEROPTIONS)
@if [ "$(BUILDER)" = stack ]; then \
ln -sf $$(stack path $(BUILDERCOMMONOPTIONS) --dist-dir)/build/git-annex/git-annex git-annex; \
ln -f $$(stack path $(BUILDERCOMMONOPTIONS) --dist-dir)/build/git-annex/git-annex git-annex; \
else \
if [ -d dist-newstyle ]; then \
ln -sf $$(cabal exec -- sh -c 'command -v git-annex') git-annex; \
ln -f $$(cabal exec -- sh -c 'command -v git-annex') git-annex; \
else \
ln -sf dist/build/git-annex/git-annex git-annex; \
ln -f dist/build/git-annex/git-annex git-annex; \
fi; \
fi