1.首先要source ~/.bashrc
2.注意环境变量
#!/bin/bash
source /home/mazi/.bashrc
Path="/home/mazi/source/$1/F3"
repoPath="/home/mazi/bin/repo"
cd "$Path"
$repoPath forall -c 'git checkout -f;git clean -fd'
$repoPath forall -c 'git checkout dev'
$repoPath sync -j24
for gTag in `git tag | grep G6_F| grep OFF_2013`
do
if [ "${gTag}" \> "${lastTag}" ]; then
lastTag=${gTag}
fi
done
echo $lastTag > xxx
$repoPath forall -c "git branch -D $lastTag"
$repoPath forall -c "git checkout -b $lastTag $lastTag"
$Path/cu.sh restore
$Path/cu.sh G6
echo `pwd` >> xxx
$Path/build.sh G6 androidu &