Merge "build.sh: improve build_all_pkg.sh fix warning [1/1]" into projects/amlogic-dev
diff --git a/build_all_pkg.sh b/build_all_pkg.sh
index 2f4863e..a130feb 100755
--- a/build_all_pkg.sh
+++ b/build_all_pkg.sh
@@ -14,6 +14,8 @@
cat <<EOF > $BUILD_LOG
EOF
+TEMP_LOG="$OUTPUT_DIR/temp.log"
+
source scripts/publish.sh
function get_new_package_dir() {
@@ -23,6 +25,13 @@
export CURRENT_PRODUCTS_DIR_NAME
}
+# compile warning check
+function compile_warning_check(){
+ touch $TEMP_LOG
+ CAT_LINE=`sed -n -e '/UBOOT COMPILE START/=' $1`
+ sed -n "1,${CAT_LINE}p" $1 >> $TEMP_LOG
+}
+
echo "======== Building all packages ========" | tee -a $BUILD_LOG
source scripts/gen_package_combination.sh
@@ -35,8 +44,9 @@
make package >> $BUILD_LOG 2>&1
get_new_package_dir
[ "$?" -ne 0 ] && echo "failed!" && cat $BUILD_LOG && echo -e "\nAborted with errors!\n" && exit 3
- grep -qr "warning: " $BUILD_LOG
- [ "$?" -eq 0 ] && cat $BUILD_LOG && echo -e "\nAborted with warnings!\n" && exit 1
+ compile_warning_check $BUILD_LOG
+ grep -qr "warning: " $TEMP_LOG
+ [ "$?" -eq 0 ] && cat $BUILD_LOG && echo -e "\nAborted with warnings!\n" && rm $TEMP_LOG && exit 1
echo "OK."
if [[ "$SUBMIT_TYPE" == "release" ]]; then
publish_packages >> $BUILD_LOG 2>&1
@@ -45,6 +55,8 @@
index=$((index + 1))
done <"$PACKAGE_COMBINATION"
+rm $TEMP_LOG
+
[[ "$SUBMIT_TYPE" == "release" ]] && post_publish_packages >> $BUILD_LOG 2>&1
echo -e "======== Done ========\n" | tee -a $BUILD_LOG
diff --git a/package.sh b/package.sh
index 16c8658..2b7cf0a 100755
--- a/package.sh
+++ b/package.sh
@@ -201,6 +201,7 @@
#build uboot
function build_uboot() {
+ echo "UBOOT COMPILE START"
if [ -z "$UBOOT_BOARDNAME" ]; then
echo "Select board($BOARD) not support compile uboot"
exit 1