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

时间:2023-03-08 19:23:22
Android源代码同步脚本(增加设置线程参数)
#!/bin/sh
#Filename: repo_sync.sh
count=
ret=
while [ $ret -ne ]
do
#输入参数1,用作同步的线程数
#如果什么参数都不输入,默认线程为4
#usage: ./repo_sync.sh
if [ $ -lt ] && [ $ -gt ]; then
echo "start repo thread is " $
repo sync -j$
else
echo "use default repo thread 4"
repo sync -j4
fi ret=$?
count=$(( $count + ))
echo "try $count, ret: $ret"
done
echo "try $count, ret: $ret"