]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Fix path resolution under OSX
authorMatt Corallo <git@bluematt.me>
Mon, 8 Mar 2021 21:02:49 +0000 (16:02 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 8 Mar 2021 21:14:00 +0000 (16:14 -0500)
genbindings.sh

index 6358e30d59d4cad1ba979c21635f8357f9c0361c..0d8a691bfdcac33aa34a314b3cbca19cf95a264b 100755 (executable)
@@ -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