diff --git a/build/gobind-pinecone/build.sh b/build/gobind-pinecone/build.sh index 2dfa0178d..d94f0b07f 100644 --- a/build/gobind-pinecone/build.sh +++ b/build/gobind-pinecone/build.sh @@ -1,5 +1,22 @@ #!/bin/sh +TARGET="" + +while getopts "ai" option +do + case "$option" + in + a) TARGET="android";; + i) TARGET="ios";; + esac +done + +if [[ $TARGET = "" ]]; +then + echo "No target specified, specify -a or -i" + exit 1 +fi + gomobile bind -v \ - -target ios \ + -target $TARGET \ github.com/matrix-org/dendrite/build/gobind-pinecone \ No newline at end of file diff --git a/build/gobind-yggdrasil/build.sh b/build/gobind-yggdrasil/build.sh index 334cc03a2..a9889d8d2 100644 --- a/build/gobind-yggdrasil/build.sh +++ b/build/gobind-yggdrasil/build.sh @@ -1,6 +1,25 @@ #!/bin/sh +#!/bin/sh + +TARGET="" + +while getopts "ai" option +do + case "$option" + in + a) TARGET="android";; + i) TARGET="ios";; + esac +done + +if [[ $TARGET = "" ]]; +then + echo "No target specified, specify -a or -i" + exit 1 +fi + gomobile bind -v \ + -target $TARGET \ -ldflags "-X github.com/yggdrasil-network/yggdrasil-go/src/version.buildName=dendrite" \ - -target ios \ - github.com/matrix-org/dendrite/build/gobind-yggdrasil \ No newline at end of file + github.com/matrix-org/dendrite/build/gobind-pinecone \ No newline at end of file