diff options
author | cyBerta <cyberta@riseup.net> | 2019-07-19 17:43:31 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2019-08-02 01:49:37 +0200 |
commit | 7f8a7585c53321aa72410f72876aa68101d228dc (patch) | |
tree | 78812e9e8aa635e9323872a31f2d3ab03748eba3 /go | |
parent | f5ecd484f6ff909122a9b66669bc89e33388f1f4 (diff) |
update build_deps.sh: build shapeshifter library instead of shapeshifter-dispatcher
Diffstat (limited to 'go')
-rwxr-xr-x | go/android_build_shapeshifter.sh (renamed from go/android_build_shapeshifter_dispatcher.sh) | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/go/android_build_shapeshifter_dispatcher.sh b/go/android_build_shapeshifter.sh index 185da5cc..35b85121 100755 --- a/go/android_build_shapeshifter_dispatcher.sh +++ b/go/android_build_shapeshifter.sh @@ -4,6 +4,8 @@ # Convenience script for generating shapeshifter-dispatcher binaries for Android devices # adapted for Bitmask by cyberta +BUILD_LIBRARY=false; + function quit { echo "$1." exit 1 @@ -49,6 +51,10 @@ elif [ "$1" == "clean" ]; then fi echo "Done!" else + if [[ "$1" == "--library" ]]; then + BUILD_LIBRARY=true; + fi; + if [ -z $ANDROID_NDK_HOME ]; then echo "Android NDK path not specified!" echo "Please set \$ANDROID_NDK_HOME before starting this script!" @@ -114,7 +120,12 @@ else export CC=$NDK_TOOLCHAIN/bin/clang echo "Starting compilation for $suffix..." - ./golang/go/bin/go build -buildmode=pie -ldflags '-w -s -extldflags=-pie' -o ./out/${suffix}/piedispatcher github.com/OperatorFoundation/shapeshifter-dispatcher/shapeshifter-dispatcher || quit "Failed to cross-compile shapeshifter-dispatcher" + + if [[ BUILD_LIBRARY ]]; then + ./golang/go/bin/go build -buildmode=pie -ldflags '-w -s -extldflags=-pie' -o ./out/${suffix}/piedispatcherlib se.leap.bitmaskclient/shapeshifter || quit "Failed to cross-compile shapeshifter-dispatcher-library" + else + ./golang/go/bin/go build -buildmode=pie -ldflags '-w -s -extldflags=-pie' -o ./out/${suffix}/piedispatcher github.com/OperatorFoundation/shapeshifter-dispatcher/shapeshifter-dispatcher || quit "Failed to cross-compile shapeshifter-dispatcher" + fi echo "Build succeeded!" done |