From: Matt Corallo Date: Mon, 8 Mar 2021 21:02:49 +0000 (-0500) Subject: Fix path resolution under OSX X-Git-Tag: v0.0.98~25^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ef6ea73f1f1aa71a8547cf02e380607750c6dcdb;p=ldk-c-bindings Fix path resolution under OSX --- 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