Skip to content
Snippets Groups Projects
Commit 428ae1c2 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

plumed patch -e accepts a close match

When doing plumed patch -e gromacs2016.5 a match with e.g. gromacs2016.4
will be accepted (and issue a WARNING). Useful for automatized patching
procedures.

For instance, in gromacs-plumed package of MacPorts it won't be necessary
to synchronize the Portfile with the exact plumed version.
parent b6c39cf6
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,25 @@ then
done
fi
if [[ "$action" == patch || "$action" == revert ]]
then
found=no
for engine_try in $mdlist ; do
if [[ "$engine" == "$engine_try" ]] ; then
found=yes
fi
done
if [[ "$found" == no ]] ; then
echo "WARNING: engine $engine not found, I will search for a close match"
for engine_try in $mdlist ; do
if [[ "${engine%.*}" == "${engine_try%.*}" ]] ; then
echo "WARNING: found $engine_try"
engine="$engine_try"
fi
done
fi
fi
if [ -z "$diff" ]
then
diff="$PLUMED_ROOT/patches/${engine}.diff"
......
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