mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-07 09:48:07 +01:00
0d49eddf16
Solution: Use `set -e` Note: To be reported in ZPROJECT, when generating the same for CZMQ & ZYRE. Note: `make clean` may fail when Makefile is not yet generated (case of 1st call of build.sh after git clone). Additionnaly, cleaned the dependency folder (report of ZPROJECT generated scripts).
39 lines
727 B
Bash
Executable File
39 lines
727 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Exit if any step fails
|
|
set -e
|
|
|
|
export NDK_VERSION=android-ndk-r25
|
|
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
|
|
|
|
# Cleanup.
|
|
rm -rf /tmp/tmp-deps
|
|
mkdir -p /tmp/tmp-deps
|
|
|
|
case $(uname | tr '[:upper:]' '[:lower:]') in
|
|
linux*)
|
|
HOST_PLATFORM=linux
|
|
;;
|
|
darwin*)
|
|
HOST_PLATFORM=darwin
|
|
;;
|
|
*)
|
|
echo "Unsupported platform"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
|
|
export FILENAME=$NDK_VERSION-$HOST_PLATFORM.zip
|
|
|
|
(cd '/tmp' \
|
|
&& wget http://dl.google.com/android/repository/$FILENAME -O $FILENAME &> /dev/null \
|
|
&& unzip -q $FILENAME) || exit 1
|
|
unset FILENAME
|
|
fi
|
|
|
|
./build.sh "arm"
|
|
./build.sh "arm64"
|
|
./build.sh "x86"
|
|
./build.sh "x86_64"
|