From 8c273aa0fa923a1eaf53b0effccd42b0718ef113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4tzel?= Date: Mon, 9 Nov 2020 15:02:39 +0100 Subject: [PATCH] Automate searching for executable in run script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For now, do it relatively unsafe (you may have to delete the `dist-newstyle` folder and then rebuild if there may be multiple executables found under `dist-newstyle`—e.g. from different GHC versions—as this is not handled correctly by the script). --- run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run b/run index ad913ec..846a085 100755 --- a/run +++ b/run @@ -1,8 +1,9 @@ #! /usr/bin/env nix-shell #! nix-shell -i fish -p fish feedgnuplot +set exe (fd --type f '^haga$' dist-newstyle/) -dist-newstyle/build/x86_64-linux/ghc-8.8.3/haga-0.1.0.0/x/haga/build/haga/haga $argv | \ +"$exe" $argv | \ # dist-newstyle/build/x86_64-linux/ghc-8.6.5/ga-0.1.0.0/x/ga/build/ga/ga $argv | \ feedgnuplot \ --terminal "x11 background '#ffffff'" \