streamlet-examples/cloc
branchv_0
changeset 70 018e2609f5bb
parent 50 22ed5647b235
equal deleted inserted replaced
69:52f837fbb216 70:018e2609f5bb
    62 	[[ -d "$currentFile" ]] || read_nullbyte language files blank comment code total < <( cloc "$currentFile" | perl -ne 'if (/(.*?)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) { print "$1\0$2\0$3\0$4\0$5\0"; print $3 + $4 + $5; print "\0"; }' );
    62 	[[ -d "$currentFile" ]] || read_nullbyte language files blank comment code total < <( cloc "$currentFile" | perl -ne 'if (/(.*?)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) { print "$1\0$2\0$3\0$4\0$5\0"; print $3 + $4 + $5; print "\0"; }' );
    63 
    63 
    64 	for (( i=0; i<${#clocFields[@]}; i++)); do
    64 	for (( i=0; i<${#clocFields[@]}; i++)); do
    65 		value="${!clocFields[$i]}";
    65 		value="${!clocFields[$i]}";
    66 
    66 
    67 		if [[ "x$files" == "x1" ]]; then                                isNull="false";
    67 		if [[ "x$files" == "x1" ]]; then isNull="false";
    68 		elif [[ "x${clocFields[$i]}" == "xlanguage" ]]; then value="";  isNull="true";
    68 		else                             isNull="true"; fi
    69 		else                                                 value="0"; isNull="true"; fi
       
    70 
    69 
    71 		send OUTPUT_ATTRIBUTE "$value"    "$isNull";
    70 		send OUTPUT_ATTRIBUTE "$value"    "$isNull";
    72 	done
    71 	done
    73 	
    72 	
    74 	send WAITING_FOR_INPUT_ATTRIBUTES;
    73 	send WAITING_FOR_INPUT_ATTRIBUTES;