Skip to content
Snippets Groups Projects
Commit 09739122 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[parameters] improve compareparameters script, adapt current parameter

list



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@15409 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent ccede554
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
# retrieve all occurrences of GET_PARAM and GET_RUNTIME_PARAM # retrieve all occurrences of GET_PARAM and GET_RUNTIME_PARAM
find dumux/ -name '*.[ch][ch]' -exec grep 'GET_PARAM' {} \; | sort -u >new_parameters.csv find dumux/ -name '*.[ch][ch]' -exec grep 'GET_PARAM' {} \; | sort -u >new_parameters.csv
find dumux/ -name '*.[ch][ch]' -exec grep 'GET_RUNTIME_PARAM' {} \; | sort -u >>new_parameters.csv find dumux/ -name '*.[ch][ch]' -exec grep 'GET_RUNTIME_PARAM' {} \; | sort -u >>new_parameters.csv
# remove all lines containing CSTRING
sed -i '/CSTRING/d' new_parameters.csv
# remove #define's # remove #define's
sed -i '/#define/d' new_parameters.csv sed -i '/#define/d' new_parameters.csv
# remove everything before GET_PARAM and GET_RUNTIME_PARAM # remove everything before GET_PARAM and GET_RUNTIME_PARAM
...@@ -23,6 +25,8 @@ sed -i '/,.*,/!d' new_parameters.csv ...@@ -23,6 +25,8 @@ sed -i '/,.*,/!d' new_parameters.csv
# append types to the end of the lines # append types to the end of the lines
sed -i '/^bool,/ s/$/, bool/' new_parameters.csv sed -i '/^bool,/ s/$/, bool/' new_parameters.csv
sed -i '/^double,/ s/$/, double/' new_parameters.csv sed -i '/^double,/ s/$/, double/' new_parameters.csv
sed -i 's/unsigned int/int/' new_parameters.csv
sed -i 's/unsigned/int/' new_parameters.csv
sed -i '/^int,/ s/$/, int/' new_parameters.csv sed -i '/^int,/ s/$/, int/' new_parameters.csv
sed -i '/^Scalar,/ s/$/, Scalar/' new_parameters.csv sed -i '/^Scalar,/ s/$/, Scalar/' new_parameters.csv
sed -i '/^std::string,/ s/$/, std::string/' new_parameters.csv sed -i '/^std::string,/ s/$/, std::string/' new_parameters.csv
...@@ -59,25 +63,32 @@ while read line; do ...@@ -59,25 +63,32 @@ while read line; do
#echo "$word" #echo "$word"
firstletter=$(echo $word | head -c 1) firstletter=$(echo $word | head -c 1)
if [ "$firstletter" != "|" ]; then if [ "$firstletter" != "|" ]; then
group=$word group=$word
linewithoutgroup=$(echo "$line" | cut -d \| -f2-)
echo "$linewithoutgroup" >>tmp.csv
else
linewithoutgroup=$(echo "$line" | cut -d \| -f2-)
echo "$group$linewithoutgroup" >>tmp.csv
fi fi
if [ "$group" = "" ]; then if [ "$group" = "" ]; then
echo "No group found in line $line." echo "No group found in line $line."
fi fi
linewithoutgroup=$(echo "$line" | cut -d " " -f2-)
echo "$group $linewithoutgroup" >>tmp.csv
done <old_parameters.csv done <old_parameters.csv
mv tmp.csv old_parameters.csv mv tmp.csv old_parameters.csv
# truncate the default and description information # truncate the default and description information
cat old_parameters.csv | while read line cat old_parameters.csv | while read line
do do
TEMP=`echo "${line% |*}"` TEMP=`echo "${line% |*|}"`
echo "${TEMP% |*}" >> tmp.csv echo "${TEMP% |*}" >> tmp.csv
done done
mv tmp.csv old_parameters.csv mv tmp.csv old_parameters.csv
#adapt to doxygen format #adapt to doxygen format
sed -i 's/| | /| /g' old_parameters.csv sed -i 's/| | /| /g' old_parameters.csv
sed -i 's/^/ * | /' old_parameters.csv sed -i 's/^/ * | /' old_parameters.csv
# remove the line with the ParameterFile
sed -i '/ParameterFile/d' old_parameters.csv
# sort uniquely for consistency
sort -u old_parameters.csv -o old_parameters.csv
# 3. compare lists of old and new parameters # 3. compare lists of old and new parameters
# treat additions # treat additions
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment