scripts/unify-sources.sh
changeset 440 88ed40ad0d4f
parent 341 f8832dc16d45
child 554 6b9c1f6eb1e5
equal deleted inserted replaced
6:6ae052554994 7:d3d33b5b2120
   128 
   128 
   129 function check_done() {
   129 function check_done() {
   130     echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
   130     echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
   131     echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
   131     echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
   132 
   132 
   133     if [ $FAILED_FILES -gt 0 ]
   133     if [ $WARNED_FILES -gt 0 -o $FAILED_FILES -gt 0 ]
   134     then
       
   135 	return 1
       
   136     elif [ $WARNED_FILES -gt 0 ]
       
   137     then
   134     then
   138 	if [ "$WARNING" == 'INTERACTIVE' ]
   135 	if [ "$WARNING" == 'INTERACTIVE' ]
   139 	then
   136 	then
   140 	    echo -n "Are the files with warnings acceptable? (yes/no) "
   137 	    echo -n "Are the files with errors/warnings acceptable? (yes/no) "
   141 	    while read answer
   138 	    while read answer
   142 	    do
   139 	    do
   143 		if [ "$answer" == 'yes' ]
   140 		if [ "$answer" == 'yes' ]
   144 		then
   141 		then
   145 		    return 0
   142 		    return 0
   146 		elif [ "$answer" == 'no' ]
   143 		elif [ "$answer" == 'no' ]
   147 		then
   144 		then
   148 		    return 1
   145 		    return 1
   149 		fi
   146 		fi
   150 		echo -n "Are the files with warnings acceptable? (yes/no) "
   147 		echo -n "Are the files with errors/warnings acceptable? (yes/no) "
   151 	    done
   148 	    done
   152 	elif [ "$WARNING" == 'WERROR' ]
   149 	elif [ "$WARNING" == 'WERROR' ]
   153 	then
   150 	then
   154 	    return 1
   151 	    return 1
   155 	fi
   152 	fi