From: crouzet Date: Tue, 13 Dec 2005 16:07:36 +0000 (+0000) Subject: bug : restriction : don't allow new name to contain old name. X-Git-Tag: V2_2_6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6cac49d895656e3f17e447a263219851420d28c7;p=tools%2Fhxx2salome.git bug : restriction : don't allow new name to contain old name. --- diff --git a/scripts/renameSalomeModule b/scripts/renameSalomeModule index 0347fc0..8e9ab33 100755 --- a/scripts/renameSalomeModule +++ b/scripts/renameSalomeModule @@ -8,6 +8,8 @@ usage() echo echo " -> replace any occurence of oldName by newName in module dirModule" echo + echo " (nex name cannot contain old name)" + echo echo Example : echo echo " cp -r HELLO_SRC CALCULATOR_SRC" @@ -50,6 +52,14 @@ else moduleName=$3 fi +# check names for restriction +echo $newName | grep $oldName > /dev/null +if [ $? -eq 0 ] +then + echo -e "Sorry : There is a restriction!\nNew name cannot contain old name.\n" + usage +fi + today=`date +%d%m%y` # Check arguments