From: Matt Corallo Date: Thu, 22 Apr 2021 17:27:25 +0000 (+0000) Subject: Fix genbindings.sh sed call on OSX X-Git-Tag: v0.0.98~1^2~25 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=13a09ddd7211402f31279e90f09b133ab4df76cc;p=ldk-java Fix genbindings.sh sed call on OSX --- diff --git a/genbindings.sh b/genbindings.sh index e208785f..b06f9c40 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -19,7 +19,12 @@ fi set -e cp "$1/lightning-c-bindings/include/lightning.h" ./ -sed -i "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h +if [ "$(rustc --version --verbose | grep "host:")" = "host: x86_64-apple-darwin" ]; then + # OSX sed is for some reason not compatible with GNU sed + sed -i '' "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h +else + sed -i "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h +fi echo "Creating Java bindings..." mkdir -p src/main/java/org/ldk/{enums,structs}