由于网络和仓库过大等原因,android代码下载时容易期间有某些仓报错
fatal: The remote end hung up unexpectedly
fatal: 过早的文件结束符(EOF)
fatal: index-pack failed
error: Cannot fetch
可使用以下脚本进行 repo sync
#!/bin/bash
echo "====== start repo sync ======"
repo sync -c -j8
while [ $? = 1 ]; do
echo "====== sync failed, re-sync again ======"
sleep 3
repo sync -c -j8
done