]> AND Private Git Repository - loba.git/blobdiff - new_loba.sh
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add all- (or X-) comp. iterations, counting empty iterations too.
[loba.git] / new_loba.sh
index 7519afcd8e01e898926f082b692b38bc09dcc201..ba076fb753f1ee4f64d873ea29a9917526bb233c 100755 (executable)
@@ -25,7 +25,7 @@ EOF
 fi
 
 name=$(echo $1 | tr A-Z a-z)
-if ! echo "$name" | grep -q '^[a-z][a-z0-9_]*$' \
+if ! echo "$name" | grep -q '^[a-z0-9_]\+$' \
     || ! [ $(echo "$name" | wc -l) = 1 ]; then
     echo "ERROR: invalid name -- \"$name\"" >&2
     exit 1
@@ -125,8 +125,9 @@ nol_insert && $1 ~ /\}/ {
 }
 
 nol_insert && !nol_inserted && /NOL_INSERT/ {
-    if ($1 > nol_compare) {
-        print nol_string;
+    if ($1 >= nol_compare) {
+        if ($1 > nol_compare)
+            print nol_string;
         nol_inserted = 1;
     }
 }