Index: /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
===================================================================
--- /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12263)
+++ /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12264)
@@ -3,5 +3,5 @@
 
 #Get all lines of EnumDefinitions2.h which hold Enum | remove all comas > put everything in file temp
-cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" > temp
+cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,/ /g" | awk '{print $1}' > temp
 
 #Removed existing files
@@ -101,26 +101,25 @@
 
 # go through the lines of temp
-for (( i=1 ; i<=$NUMENUMS ; i++ )); do
+ENUM=0;
+for NAMEENUM in $(cat temp); do
 
 	#Get name and enum of the line i
-	NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$1);}');
 	NAME=$(echo $NAMEENUM | sed -e "s/Enum//g")
-	ENUM=$i;
 	#offset Enum by one (Enum begins with 0 and not 1!)
-	let ENUM=$ENUM-1
+	let ENUM=$ENUM+1
 
 	#print info {{{
-	if [ $i -lt 10 ]
+	if [ $ENUM -lt 10 ]
 	then
 		printf "\r                                                                      "
-		printf "\r  $i/$NUMENUMS Adding "$NAME"..."
+		printf "\r  $ENUM/$NUMENUMS Adding "$NAME"..."
 	else
-		if [ $i -lt 100 ]
+		if [ $ENUM -lt 100 ]
 		then
 			printf "\r                                                                      "
-			printf "\r $i/$NUMENUMS Adding "$NAME"..."
+			printf "\r $ENUM/$NUMENUMS Adding "$NAME"..."
 		else
 			printf "\r                                                                      "
-			printf "\r$i/$NUMENUMS Adding "$NAME"..."
+			printf "\r$ENUM/$NUMENUMS Adding "$NAME"..."
 		fi
 	fi
