diff options
-rwxr-xr-x | build_deps.sh | 2 | ||||
-rwxr-xr-x | go/android_build_shapeshifter.sh | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/build_deps.sh b/build_deps.sh index 7f0c8e89..9933709b 100755 --- a/build_deps.sh +++ b/build_deps.sh @@ -32,6 +32,6 @@ else echo "Clean build: compiling Go libraries" cd ./go || quit "Directory go not found" ./install_go.sh || quit "install_go.sh failed" - ./android_build_shapeshifter_lib.sh || quit "android_build_shapeshifter_dispatcher.sh failed" + ./android_build_shapeshifter.sh createLibrary || quit "android_build_shapeshifter_dispatcher.sh failed" cd .. fi diff --git a/go/android_build_shapeshifter.sh b/go/android_build_shapeshifter.sh index 35b85121..85204906 100755 --- a/go/android_build_shapeshifter.sh +++ b/go/android_build_shapeshifter.sh @@ -11,7 +11,7 @@ function quit { exit 1 } -if [ "$1" == "removeall" ]; then +if [ "$1" == "removeAll" ]; then echo "removing golang, sources and generated files" for folder in /tmp/android-toolchain-*; do if [[ -d $folder ]]; then @@ -51,9 +51,9 @@ elif [ "$1" == "clean" ]; then fi echo "Done!" else - if [[ "$1" == "--library" ]]; then - BUILD_LIBRARY=true; - fi; + if [[ "$1" == "createLibrary" ]]; then + BUILD_LIBRARY=true + fi if [ -z $ANDROID_NDK_HOME ]; then echo "Android NDK path not specified!" @@ -122,7 +122,8 @@ else echo "Starting compilation for $suffix..." 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" + ./android_build_shapeshifter_lib.sh || 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 |