diff --git a/bin/jni/make-swig.sh b/bin/jni/make-swig.sh
index c2a328f477fa4a82575d9c98392ceb3dcb8790e4..d1153cc7b869f31e667b76f95ff55697bd7cce50 100755
--- a/bin/jni/make-swig.sh
+++ b/bin/jni/make-swig.sh
@@ -17,6 +17,7 @@
 #
 #  You should have received a copy of the GNU General Public License
 #  along with this program. If not, see <https://www.gnu.org/licenses/>.
+set -e
 
 JNIDIR=`pwd`
 PACKAGE=cx.ring.daemon