From c71889d9da8ce4dc5242172bf7d37929c677d3cf Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Wed, 7 Mar 2012 10:16:48 +0800 Subject: [PATCH] compile-openwrt-xburst.sh: only zip the files when successful --- .../qi_lb60/scripts/compile-openwrt-xburst.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh b/nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh index 3d91607..0c11a68 100755 --- a/nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh +++ b/nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh @@ -83,21 +83,19 @@ cp -a bin/xburst/* ${IMAGES_DIR} 2>/dev/null mkdir -p ${IMAGES_DIR}/files cp -a files/* ${IMAGES_DIR}/files/ -(cd ${IMAGES_DIR}; \ - grep -E "ERROR:\ package.*failed to build" BUILD_LOG | \ - grep -v "package/kernel" > failed_packages.txt; \ - bzip2 -z BUILD_LOG; \ - bzip2 -z openwrt-xburst-qi_lb60-root.ubi; \ -) - if [ "${MAKE_RET}" != "0" ]; then echo "ERROR: Build failed! please refer to the BUILD_LOG file" - tail -n 100 ${IMAGES_DIR}/BUILD_LOG > \ - ${IMAGES_DIR}/BUILD_LOG.`date +"%m%d%Y-%H%M"`.last100 + tail -n 100 ${IMAGES_DIR}/BUILD_LOG > ${IMAGES_DIR}/BUILD_LOG.last100 MSG="The build was FAILED" URL="http://fidelio.qi-hardware.com/~xiangfu/building/Nanonote/Ben/\ /${OPENWRT_DIR_NAME}-${DATE_TIME}" else + (cd ${IMAGES_DIR} && \ + grep -E "ERROR:\ package.*failed to build" BUILD_LOG | \ + grep -v "package/kernel" > failed_packages.txt; \ + bzip2 -z BUILD_LOG; \ + bzip2 -z openwrt-xburst-qi_lb60-root.ubi; \ + ) mv ${IMAGES_DIR} ${DEST_DIR} MSG="The build was successful" URL="${IMAGES_URL}/${OPENWRT_DIR_NAME}-${DATE_TIME}"