From ef6ea73f1f1aa71a8547cf02e380607750c6dcdb Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 8 Mar 2021 16:02:49 -0500 Subject: [PATCH] Fix path resolution under OSX --- genbindings.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/genbindings.sh b/genbindings.sh index 6358e30..0d8a691 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -7,7 +7,12 @@ if [ ! -d "$1/lightning" ]; then echo "USAGE: $0 path-to-rust-lightning" exit 1 fi -LIGHTNING_PATH="$(realpath "$1/lightning")" + +# On reasonable systems, we can use realpath here, but OSX is a diva with 20-year-old software. +ORIG_PWD="$(pwd)" +cd "$1/lightning" +LIGHTNING_PATH="$(pwd)" +cd "$ORIG_PWD" # Generate (and reasonably test) C bindings -- 2.30.2