From e8947de20941db67bf3db49327a1d20138a71268 Mon Sep 17 00:00:00 2001 From: crouzet Date: Tue, 25 Oct 2005 14:12:14 +0000 Subject: [PATCH] tools for creating a c++ component tree for compilation --- scripts/SA_new_cpp_component | 85 +++++++++++++++++++++++++++++++++ scripts/cpp_compo_template.tgz | Bin 0 -> 9022 bytes 2 files changed, 85 insertions(+) create mode 100755 scripts/SA_new_cpp_component create mode 100644 scripts/cpp_compo_template.tgz diff --git a/scripts/SA_new_cpp_component b/scripts/SA_new_cpp_component new file mode 100755 index 0000000..e59c54c --- /dev/null +++ b/scripts/SA_new_cpp_component @@ -0,0 +1,85 @@ +#!/bin/bash + +usage() +{ + echo + echo Usage : + echo + echo " SA_new_cpp_component Name" + echo + echo " -> create the tree to compile a new C++ component linked with MED libs" + echo + exit 1 +} + +rename_dir() +{ + # Rename the first directory containing $oldName in their file name + liste=`find . -type d -name "*${oldName}*"` + for file in $liste + do + newFile=`echo $file | sed "s/${oldName}/${newName}/g"` + echo "mv -f $file $newFile" + mv -f $file $newFile + return 1 + done + return 0 +} + +if [ $# -ne 1 ] +then + usage +fi + +tar xvfz ${HXX2SALOME_ROOT_DIR}/cpp_compo_template.tgz +moduleName=${1}_CPP_SRC +mv template_SRC ${moduleName} + +oldName=template +newName=$1 + +today=`date +%d%m%y` +cd ${moduleName} +echo +echo Renamed Directories: +echo + +# rename directories one by one +rename_dir +while [ $? -eq 1 ] +do + rename_dir +done + +# rename files containing ${oldName} in their name +echo +echo Renamed Files: +echo +liste=`find . -name "*${oldName}*"` +for file in $liste +do + newFile=`echo $file | sed "s/${oldName}/${newName}/g"` + echo "mv -f $file $newFile" + mv -f $file $newFile +done + +echo +echo Modified Files: +echo +# modify all files containing $oldName, replace occurences by $newName +liste=`find -name "*"` +for file in $liste +do + if [ -f $file ] + then + grep $oldName $file > /dev/null 2>&1 + if [ $? -eq 0 ] + then + echo $file + cat $file | sed "s/${oldName}/${newName}/g" > fic_temp_${today} + cp -f fic_temp_${today} $file + fi + fi +done +rm -f fic_temp_${today} +cd - diff --git a/scripts/cpp_compo_template.tgz b/scripts/cpp_compo_template.tgz new file mode 100644 index 0000000000000000000000000000000000000000..86bdd4d48326934c0cf62679f45d93bacfdbd20c GIT binary patch literal 9022 zcmV-EBf;DsiwFR19#umC1MFRUciKp@&%e>9=pkeVvf}N>jveQOU~IF&m|)|Qz6jm=v11u1`n@!fl^=6})r zk0x|<@f`ENQCmyQ|5|x9|IcwLvm0+>Tf@;*Cp&~%m*ii{%YL)HH|!l94Tig|-cB|* zbLhEooyV$PvpXC#`-6T^T=J;vxw7)G-fG9|U_BY8sf{V4>edGbKyhYRy5ZzY*<82Y z_*ma>=C|fA+Y8fVEuKAIH1K0C&plPL;Y;sw(lY37#l^4xaFIWa8q ziDYx`$T4P~JM1@lt?r`ilnqUpE!y6)7xp0e%0E);@9OCUuu?th^pxIohl^y1w2b*{`lM z0+YEdy)GKc%WMuA=SgAox4)5sJJEFeiWImZ0WDSz8{O_+yT0GQMZ0-fu%UdWdG7oS zEcA8JwAI(hTFt({CE2%rZ>GIPf{vl5uf49XD*1+h0nl1d5MN`KUFs8*|Xu< z+%R>v6~R{J*|rIanc6zt8QIgBVFI6A;Qiu3D2nKg3*Th}L0!?& z1Y3rbb|~~F^d+vFht-^N1p8%xOkT2rEu4P+b%5N>{ohCM?>y=Zc9*C%6=7I;8xK!PZP9A zDycv#4h_+j9O~M0X9Uu47bBVbJ`IY)d<|=4&UK2EVJcA^ru4lNmw-E^VZSwK4qKi6 zpx$oZK1Q8g+w}?t*Qw?iFxA2mmsO_VQ9vygCboUCMP!kCWsCy?{I-Q-m1`7K0?SlW zN#K`D4zJPYv9<*B@di7qb+0WOTE2V5#%JjS9p6o8?vf{~Xr?=AVJ&;YaFN)GSWd zmhXe(zlHN(#lyY`{;O6ts;l_#S*};4fzwO0O9;`lGs85z8)Bc6zGm7}`kPBWHhZ0B zn}9FXoExGWuICtMbM!LGEATz_Ik+^3Y>|IZ2O5x`eM54MW?dy!nB_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