Add master branch change.
Change-Id: I8892b7102753d29fefb4e23a7a7cc67c01157560
diff --git a/build.sh b/build.sh
index 51fe09e..d84fdc4 100755
--- a/build.sh
+++ b/build.sh
@@ -21,6 +21,37 @@
fi
export BUILD_BRANCH=`git branch | grep "*" | cut -d " " -f 2`
+BUILD_PROJECT_TEMP=`cat build_version | grep PROJECT | cut -d '=' -f 2`
+echo "BUILD_PROJECT_TEMP=$BUILD_PROJECT_TEMP"
+
+if [ "$BUILD_PLATFORM" == "asr1803" ];then
+ if [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-4`" == "L509" ];then
+ export BUILD_PROJECT=L509
+ elif [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-4`" == "L508" ];then
+ export BUILD_PROJECT=L508
+ elif [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-6`" == "PN1803" ];then
+ export BUILD_PROJECT=PN1803
+ else
+ echo "Unknown BUILD_PROJECT:$BUILD_PROJECT_TEMP"
+ exit 1
+ fi
+else
+ if [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-4`" == "L509" ];then
+ export BUILD_PROJECT=L509
+ elif [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-4`" == "L508" ];then
+ export BUILD_PROJECT=L508
+ elif [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-6`" == "PN1803" ];then
+ export BUILD_PROJECT=PN1803
+ elif [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-4`" == "T108" ];then
+ export BUILD_PROJECT=T108
+ elif [ "`echo $BUILD_PROJECT_TEMP | cut -c 1-7`" == "L508_X6" ];then
+ export BUILD_PROJECT=L508_X6
+ else
+ echo "Unknown BUILD_PROJECT:$BUILD_PROJECT_TEMP"
+ exit 1
+ fi
+fi
+
cd $ROOT_DIR
export STAGING_DIR=
@@ -71,10 +102,10 @@
# Copy All Bin Files.
#cp -f out/bin/* $ROOTFS_DIR/bin
- cp -f out/bin/at $ROOTFS_DIR/bin
- cp -f out/bin/mbtk_ril $ROOTFS_DIR/bin
- cp -f out/bin/mbtk_logd $ROOTFS_DIR/bin
- cp -f out/bin/mbtk_adbd $ROOTFS_DIR/bin
+ [ -f out/bin/at ] && cp -f out/bin/at $ROOTFS_DIR/bin
+ [ -f out/bin/mbtk_rild ] && cp -f out/bin/mbtk_rild $ROOTFS_DIR/bin
+ [ -f out/bin/mbtk_logd ] && cp -f out/bin/mbtk_logd $ROOTFS_DIR/bin
+ [ -f out/bin/mbtk_adbd ] && cp -f out/bin/mbtk_adbd $ROOTFS_DIR/bin
[ -f out/bin/device_info_generate ] && cp -f out/bin/device_info_generate $ROOTFS_DIR
[ -f out/bin/device_info ] && cp -f out/bin/device_info $ROOTFS_DIR/bin
else