summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/build-native.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/misc/build-native.sh b/misc/build-native.sh
index 34cd137d..e1825e7d 100755
--- a/misc/build-native.sh
+++ b/misc/build-native.sh
@@ -1,3 +1,9 @@
+#!/bin/bash
+
+# Exit on errors
+set -e
+
+# Generate git config if the openvpn directory is checked out from git
if [ -d openvpn/.git ]; then
GIT=git
cd openvpn
@@ -17,6 +23,7 @@ if [ -d openvpn/.git ]; then
fi
ndk-build APP_API=all -j 8
+
if [ $? = 0 ]; then
rm -rf build/native-libs/
@@ -36,4 +43,6 @@ if [ $? = 0 ]; then
mkdir -p $builddir
cp -v $arch/*.so $builddir
done
+else
+ exit $?
fi