Salome HOME
projects
/
tools
/
hxx2salome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue 0020352: Compatibility native qt4 on mandriva 2009.1 for check_qt
[tools/hxx2salome.git]
/
scripts
/
renameSalomeModule
diff --git
a/scripts/renameSalomeModule
b/scripts/renameSalomeModule
index 7354291e8b1b9f0e8b2dc1f8b32dff4054873b48..63c90b7c0af6ca68c7372631ee7fe7f297abd004 100755
(executable)
--- a/
scripts/renameSalomeModule
+++ b/
scripts/renameSalomeModule
@@
-1,4
+1,8
@@
#!/bin/bash
#!/bin/bash
+# --
+# Copyright (C) CEA, EDF
+# Author : Nicolas Crouzet (CEA)
+# --
usage()
{
usage()
{
@@
-8,6
+12,8
@@
usage()
echo
echo " -> replace any occurence of oldName by newName in module dirModule"
echo
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"
echo Example :
echo
echo " cp -r HELLO_SRC CALCULATOR_SRC"
@@
-50,6
+56,14
@@
else
moduleName=$3
fi
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
today=`date +%d%m%y`
# Check arguments
@@
-101,7
+115,7
@@
for file in $liste
do
if [ -f $file ]
then
do
if [ -f $file ]
then
- grep $oldName $file > /
tmp/junk
2>&1
+ grep $oldName $file > /
dev/null
2>&1
if [ $? -eq 0 ]
then
echo $file
if [ $? -eq 0 ]
then
echo $file