From 669f921295c55f660cec01641c714d7f71cf87ba Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Wed, 14 Mar 2012 09:32:09 +0800 Subject: [PATCH] nanonote-files: compile-openwrt-xburst.sh: ignore build when there is no new commit --- .../qi_lb60/scripts/compile-openwrt-xburst.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 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 593baf1..451a07f 100755 --- a/nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh +++ b/nanonote-files/data/qi_lb60/scripts/compile-openwrt-xburst.sh @@ -53,6 +53,17 @@ cp feeds/qipackages/nanonote-files/data/qi_lb60/conf/${CONFIG_FILE_TYPE} \ sed -i '/CONFIG_ALL/s/.*/CONFIG_ALL=y/' .config yes "" | make oldconfig > /dev/null +echo "getting version numbers of used repositories..." +HEAD_NEW=`${GET_FEEDS_VERSION_SH} ${OPENWRT_DIR}` +HEAD_OLD=`cat ${IMAGES_DIR}/../${OPENWRT_DIR_NAME}.VERSIONS` +if [ "${HEAD_NEW}" == "${HEAD_OLD}" ]; then + echo "No new commit, ignore build" + rm -f ${BUILD_LOG} ${VERSIONS_FILE} + rmdir ${IMAGES_DIR} + exit 0 +fi +${GET_FEEDS_VERSION_SH} ${OPENWRT_DIR} > ${VERSIONS_FILE} +cp ${VERSIONS_FILE} ${IMAGES_DIR}/../${OPENWRT_DIR_NAME}.VERSIONS echo "copy files, create VERSION, link dl folder, last prepare..." rm -f files && ln -s feeds/qipackages/nanonote-files/data/qi_lb60/files/ @@ -72,10 +83,6 @@ time make ${MAKE_VARS} > ${IMAGES_DIR}/BUILD_LOG 2>&1 MAKE_RET="$?" -echo "getting version numbers of used repositories..." -${GET_FEEDS_VERSION_SH} ${OPENWRT_DIR} > ${VERSIONS_FILE} - - echo "copy all files to IMAGES_DIR..." cp .config ${IMAGES_DIR}/config cp build_dir/linux-xburst_qi_lb60/linux-*/.config ${IMAGES_DIR}/kernel.config