From 63e6d52f1e1ad9ba3e5dd453115abfc2f8418fc6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Dec 2025 15:27:05 -0500 Subject: Rework makefile to simplify things --- local-tomo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'local-tomo') diff --git a/local-tomo b/local-tomo index 76864837..74143604 100755 --- a/local-tomo +++ b/local-tomo @@ -1,11 +1,11 @@ #!/bin/sh version=$(awk '/^## / {print $2; exit}' CHANGES.md) here="$(realpath "$(dirname "$0")")" -if [ ! -e "$here/build/bin/tomo@$version" ]; then +if [ ! -e "$here/dist/$version/bin/tomo@$version" ]; then echo "Tomo hasn't been compiled yet! Run \`make\` to compile it!" exit 1; fi -PATH="$here/build/bin${PATH:+:$PATH}" \ -TOMO_PATH="$here/build" \ +PATH="$here/dist/$version/bin${PATH:+:$PATH}" \ +TOMO_PATH="$here/dist/$version" \ tomo@"$version" "$@" -- cgit v1.2.3 From 434ffd71c9a7eebd46ec0cba1d97b0827b874901 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Dec 2025 15:54:55 -0500 Subject: Don't embed tomo version/path information at compile time, instead infer it at runtime --- local-tomo | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'local-tomo') diff --git a/local-tomo b/local-tomo index 74143604..d16e090e 100755 --- a/local-tomo +++ b/local-tomo @@ -1,11 +1,6 @@ #!/bin/sh version=$(awk '/^## / {print $2; exit}' CHANGES.md) -here="$(realpath "$(dirname "$0")")" -if [ ! -e "$here/dist/$version/bin/tomo@$version" ]; then - echo "Tomo hasn't been compiled yet! Run \`make\` to compile it!" - exit 1; +if ! [ -e ./build/$version/bin/tomo ]; then + make -j fi - -PATH="$here/dist/$version/bin${PATH:+:$PATH}" \ -TOMO_PATH="$here/dist/$version" \ -tomo@"$version" "$@" +exec ./build/$version/bin/tomo "$@" -- cgit v1.2.3