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

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

#!/bin/sh#Filename: repo_sync.shcount=0ret=1while [ $ret -ne 0 ]do#输入参数1,用作同步的线程数#如果什么参数都不输入,默认线程为4#usage: ./repo_sync.sh 10if [ $1 -lt 20 ] && [ $1 -gt 0 ]; then         echo "start repo thread is " $1        repo sync -j$1else        echo "use default repo thread 4"        repo sync -j4firet=$?count=$(( $count + 1))echo "try $count, ret: $ret"doneecho "try $count, ret: $ret"

 

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