From 74af392e80044d3981ea958962903af6a4d9d243 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 23 Mar 2009 22:40:15 +0100 Subject: [PATCH] Stop in case of error. Signed-off-by: Jan Vidar Krey --- admin/common.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/common.sh b/admin/common.sh index aad5fa3..9817aa0 100644 --- a/admin/common.sh +++ b/admin/common.sh @@ -72,8 +72,13 @@ function export_sources cd ${PACKAGE} ${MAKE} autotest.c - cd .. + + if [ -f ${PACKAGE}/autotest.c ]; then + echo "Unable to create autotest.c, aborting..." + exit 1 + fi + rm -Rf ${PACKAGE}/admin package_zips ${PACKAGE_SRC} ${PACKAGE} @@ -89,14 +94,13 @@ function export_binaries cd ${PACKAGE} ${MAKE} RELEASE=YES + cd .. - if [ ! -x ${BINARY} ]; then + if [ ! -x ${PACKAGE}/${BINARY} ]; then echo "Packaging failed, no binary found..." exit 1 fi - cd .. - rm -Rf ${PACKAGE}/admin rm -Rf ${PACKAGE}/autotest rm -Rf ${PACKAGE}/src @@ -108,7 +112,6 @@ function export_binaries rm -f ${PACKAGE}/doc/uhub.dot rm -f ${PACKAGE}/libuhub* - package_zips ${PACKAGE_BIN} ${PACKAGE} rm -Rf ${PACKAGE};