From 491ea0e8bd9a9e200d2fe4e54c0084d54642eb3e Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 24 Jan 2014 23:05:10 +0100 Subject: better error handling --- misc/build-native.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'misc') 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 -- cgit v1.2.3