repo sync -c -j4 while [ $? = 1 ]; do echo "Sync failed, repeat again:" repo sync -c -j4 done