[Feature][T106]ZXW P56U09 code
Only Configure: Yes
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: No
Doc Update: No
Change-Id: I3cbd8b420271eb20c2b40ebe5c78f83059cd42f3
diff --git a/ap/build/env_check.sh b/ap/build/env_check.sh
new file mode 100755
index 0000000..03bb09d
--- /dev/null
+++ b/ap/build/env_check.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+CMD_SET="gawk gcc bison flex pkg-config"
+PACKAGE_SET=("gawk" "build-essential" "bison" "flex" "pkg-config")
+RET_VALUE=0
+
+function checkCmd()
+{
+ cmd=$1
+ i=$2
+ which $cmd > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "check command $cmd ok"
+ else
+ echo "[ERROR]check command $cmd fail, Maybe run [ sudo apt-get install ${PACKAGE_SET[i]} ] to install"
+ return 1
+ fi
+}
+
+i=0
+for item in $CMD_SET;do
+ checkCmd $item $i
+ if [ $? -ne 0 ]; then
+ RET_VALUE=1
+ fi
+ let "i=i+1"
+done
+
+exit $RET_VALUE
+