Changeset 12264
- Timestamp:
- 05/17/12 10:07:18 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
r12262 r12264 3 3 4 4 #Get all lines of EnumDefinitions2.h which hold Enum | remove all comas > put everything in file temp 5 cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,/ /g"> temp5 cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,/ /g" | awk '{print $1}' > temp 6 6 7 7 #Removed existing files … … 101 101 102 102 # go through the lines of temp 103 for (( i=1 ; i<=$NUMENUMS ; i++ )); do 103 ENUM=0; 104 for NAMEENUM in $(cat temp); do 104 105 105 106 #Get name and enum of the line i 106 NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$1);}');107 107 NAME=$(echo $NAMEENUM | sed -e "s/Enum//g") 108 ENUM=$i;109 108 #offset Enum by one (Enum begins with 0 and not 1!) 110 let ENUM=$ENUM -1109 let ENUM=$ENUM+1 111 110 112 111 #print info {{{ 113 if [ $ i-lt 10 ]112 if [ $ENUM -lt 10 ] 114 113 then 115 114 printf "\r " 116 printf "\r $ i/$NUMENUMS Adding "$NAME"..."115 printf "\r $ENUM/$NUMENUMS Adding "$NAME"..." 117 116 else 118 if [ $ i-lt 100 ]117 if [ $ENUM -lt 100 ] 119 118 then 120 119 printf "\r " 121 printf "\r $ i/$NUMENUMS Adding "$NAME"..."120 printf "\r $ENUM/$NUMENUMS Adding "$NAME"..." 122 121 else 123 122 printf "\r " 124 printf "\r$ i/$NUMENUMS Adding "$NAME"..."123 printf "\r$ENUM/$NUMENUMS Adding "$NAME"..." 125 124 fi 126 125 fi
Note:
See TracChangeset
for help on using the changeset viewer.