Commit 09739122 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[parameters] improve compareparameters script, adapt current parameter


git-svn-id: svn:// 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent ccede554
......@@ -4,6 +4,8 @@
# 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_RUNTIME_PARAM' {} \; | sort -u >>new_parameters.csv
# remove all lines containing CSTRING
sed -i '/CSTRING/d' new_parameters.csv
# remove #define's
sed -i '/#define/d' new_parameters.csv
# remove everything before GET_PARAM and GET_RUNTIME_PARAM
......@@ -23,6 +25,8 @@ sed -i '/,.*,/!d' new_parameters.csv
# append types to the end of the lines
sed -i '/^bool,/ s/$/, bool/' 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 '/^Scalar,/ s/$/, Scalar/' new_parameters.csv
sed -i '/^std::string,/ s/$/, std::string/' new_parameters.csv
......@@ -59,25 +63,32 @@ while read line; do
#echo "$word"
firstletter=$(echo $word | head -c 1)
if [ "$firstletter" != "|" ]; then
linewithoutgroup=$(echo "$line" | cut -d \| -f2-)
echo "$linewithoutgroup" >>tmp.csv
linewithoutgroup=$(echo "$line" | cut -d \| -f2-)
echo "$group$linewithoutgroup" >>tmp.csv
if [ "$group" = "" ]; then
echo "No group found in line $line."
linewithoutgroup=$(echo "$line" | cut -d " " -f2-)
echo "$group $linewithoutgroup" >>tmp.csv
done <old_parameters.csv
mv tmp.csv old_parameters.csv
# truncate the default and description information
cat old_parameters.csv | while read line
TEMP=`echo "${line% |*}"`
TEMP=`echo "${line% |*|}"`
echo "${TEMP% |*}" >> tmp.csv
mv tmp.csv old_parameters.csv
#adapt to doxygen format
sed -i 's/| | /| /g' 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
# treat additions
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment