Android源代碼同步腳本(增加設(shè)置線程參數(shù))
#!/bin/sh #Filename: repo_sync.sh count=0 ret=1 while [ $ret -ne 0 ] do #輸入?yún)?shù)1,用作同步的線程數(shù) #如果什么參數(shù)都不輸入,默認(rèn)線程為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"
laser楊萬榮

浙公網(wǎng)安備 33010602011771號(hào)