$?=1; while [ $? -ne 0 ] ; do repo sync ; done
然后repo sync 工作一段时间后就不动了:
Fetching projects: 95% (210/221) Fetching project platform/prebuilt
Fetching project platform/sdk
Fetching project platform/system/bluetooth
Fetching projects: 96% (213/221) Fetching project platform/system/core
Fetching project platform/system/extras
remote: Sending approximately 1.98 GiB ...
remote: Counting objects: 73, done
remote: Finding sources: 100% (73/73)
Fetching projects: 97% (215/221) Fetching project platform/system/media
Fetching project platform/system/netd
Fetching projects: 98% (217/221) Fetching project platform/system/vold
Fetching projects: 99% (219/221) Receiving objects: 11% (2373/21570), 515.85
Receiving objects: 30% (6547/21570), 147.39 MiB | 287 KiB/s
然后查看.repo 的大小始终停留在一个地方没有变化,直到我ctrl-c中断脚本再执行一次repo sync,这是怎么回事?
luchu@luchu-N56VZ:~/ANDROID$ du -s
8175188 .
luchu@luchu-N56VZ:~/ANDROID$ du -s
8175188 .
luchu@luchu-N56VZ:~/ANDROID$ du -s
8175188 .
luchu@luchu-N56VZ:~/ANDROID$ du -s
8175188 .
luchu@luchu-N56VZ:~/ANDROID$ du -s
8175188 .
luchu@luchu-N56VZ:~/ANDROID$ du -s
8175188 .
已经尝试过:
$ sudo sysctl -w net.ipv4.tcp_window_scaling=0
$ repo sync -j1
还是老样子。