MocorDroid编译工程快速建立编译环境

function sprdLunch()
{
    declare -a arrProj
    arrProj=`find out/target/product -name previous_build_config.mk`

    if [ ${#arrProj[@]} -eq 1 ]; then
        preCfg=`cat ${arrProj[0]}`
        temp1=${preCfg##* } # get full config
        lunName=${temp1%-*} # get lunch name

        echo -n "lunch pre-config: $lunName? [ yes | no] "
        read aNum
        if [ $aNum=y -o $aNum=yes -o x$aNum = x ];then
            lunch $lunName
        else
            lunch
        fi  
    fi  

    unset arrProj
    unset preCfg
    unset temp1
    unset lunName
}

posted @ 2015-05-22 15:39  hunterDing  阅读(316)  评论(0编辑  收藏  举报