better way of finding stack built executable

This commit is contained in:
Joey Hess 2017-07-12 17:04:51 -04:00
parent b294c00e16
commit d2b69c04e3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -27,7 +27,7 @@ tmp/configure-stamp: Build/TestConfig.hs Build/Configure.hs
git-annex: tmp/configure-stamp
$(BUILDER) build $(BUILDEROPTIONS)
if [ "$(BUILDER)" = stack ]; then \
ln -sf $$(find .stack-work/ -name git-annex -type f | grep build/git-annex/git-annex | tail -n 1) git-annex; \
ln -sf $$(stack path --dist-dir)/build/git-annex/git-annex git-annex; \
else \
ln -sf dist/build/git-annex/git-annex git-annex; \
fi