scripts: improve scripts [1/1]

PD#SWPL-67525

Problem:
improve scripts

Solution:
improve scripts

Verify:
ad401_a113l

Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com>
Change-Id: Ic676cf6649d0dfc75c6b81908dd1a0a5683c929f
diff --git a/build_all_pkg.sh b/build_all_pkg.sh
index cac29b4..2f4863e 100755
--- a/build_all_pkg.sh
+++ b/build_all_pkg.sh
@@ -5,6 +5,11 @@
 # SPDX-License-Identifier: MIT
 #
 
+[ -z "$OUTPUT_DIR" ] && OUTPUT_DIR=$PWD/output
+[ ! -d $OUTPUT_DIR ] && mkdir -p $OUTPUT_DIR
+
+[ -z "$BUILD_LOG" ] && BUILD_LOG="$OUTPUT_DIR/build.log"
+
 # Clear build.log
 cat <<EOF > $BUILD_LOG
 EOF