p4 build

#!/bin/bash
#
# $1=port $2=workspace $3=CL $4=project name
#
# xinmin.su 2012/11/15
#

function usage()
{
cat << EOF
usage: `basename $0` [options] port workspace CL PROJECT_NAME
        options:
               -b true  : this is beginning of a project
                  false : this is not beginning of a project, the project is developing
               -h : help
for example:
./p4_all_b.sh 1714 CHN-BST_SYS_xinmin.su_1714STEM_bstdev124 cl superior_chn_cmcc for 9268
./p4_all_b.sh 1714 BST_Android_System_SUXINMIN_9105 cl s2vep_chn_open for 9105
./p4_all_b.sh 1714 BST_Android_System_SUXINMIN_9308 cl m0_chn_open for 9308
./p4_all_b.sh 1713 CHINA_TERMINAL_G1_SXM_Vasto-i cl vastoi_chn_cmcc for 8258
EOF
}


projectBegin="false"

while getopts "b:h" flag; do
    case $flag in
    b) projectBegin=$OPTARG;;
    h) usage;exit 0;;
    esac
done
shift $((OPTIND-1))

p4 -p 109.105.1.55:$1 login << EOL
Lovejie0
EOL

if [[ $BASH_ARGC != 4 ]]
then
    usage; exit 1;
fi

export P4PORT=109.105.1.55:$1

if [[ $projectBegin == "true" ]]
then
p4 -c $2 sync //$2/...@0
fi

p4 -c $2 sync //$2/...@$3

cd android

rm -rf out/

cd ../buildscript

./build $4

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值