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

Private GIT Repository
Don't be so picky about new algorithm name.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 3 Jun 2011 10:09:42 +0000 (12:09 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 3 Jun 2011 11:23:49 +0000 (13:23 +0200)
new_loba.sh

index 40b6ea193879a17d2bc058abf46c86f532b783bc..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