您的位置:首页 > 移动开发 > Android开发

Android源代码同步脚本(增加设置线程参数)

2016-10-03 08:47 232 查看
#!/bin/sh
#Filename: repo_sync.sh
count=0
ret=1
while [ $ret -ne 0 ]
do
#输入参数1,用作同步的线程数
#如果什么参数都不输入,默认线程为4
#usage: ./repo_sync.sh 10
if [ $1 -lt 20 ] && [ $1 -gt 0 ]; then
echo "start repo thread is " $1
repo sync -j$1
else
echo "use default repo thread 4"
repo sync -j4
fi

ret=$?
count=$(( $count + 1))
echo "try $count, ret: $ret"
done
echo "try $count, ret: $ret"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: