#!/bin/bash repo sync -j4 while [ $? -ne 0 ] do echo "======sync failed ,re-sync again======" sleep 3 repo sync -j4 done