1 $?

$?:return value of last command

example:how to repeat download android source

repo sync
while [ $? -ne 0 ] ;
do
	repo sync
end