偶然在别的地方看到到,先保存下来,以后可能会用到
一点小提示: 有时候google的android服务器老是断,总不能让我们守在电脑旁边一直手工重新repo sync吧,这可是需要N个小时才能下载完的啊。
我们就写个小脚本让电脑自动repo sync,直到下载成功为止:
#!/bin/shcount=0ret=1while [ $ret -ne 0 ]dorepo syncret=$?count=$(( $count + 1))echo "try $count, ret: $ret"doneecho "try $count, ret: $ret"
把上面的内容复制到一个文件里tryrepo.sh
然后修改tryrepo.sh的属性,开始自动工作吧。第二点早上应该就大功告成了
chmod a+x tryrepo.sh./tryrepo.sh