summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-10-06 18:01:13 +0200
committercyBerta <cyberta@riseup.net>2019-10-06 18:01:13 +0200
commitb76ca198dfb281829461b1e422aec17ea6e31440 (patch)
tree6eda1e716d22a53fb2e119c8fe8d38285b11cf1e
parent70d08db8f17279ac7a370b2255c51aefc3995d54 (diff)
tweak build script
-rwxr-xr-xbuild_deps.sh2
-rwxr-xr-xgo/android_build_shapeshifter.sh11
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