I'm curious to know if anyone has any suggestions on the best way to patch configuration files for software products that may contain custom settings.
I'm familiar with diff
, patch
, diff3
, etc... but those don't patch the differences in the files if not captured properly.
What I'm looking to do is push out a bunch of updates quickly and easily that would modify default settings in a configuration file that would exist and if they do not exist then add them, while at the same time maintaining and preserving any custom settings that a customer may have added so they do not lose their configurations and the layout of the file.
I have various products that are in various formats like key/value, XML, etc. that I'm trying to determine what is the best course of action to manage over the long run instead of writing various parsers and scripts to do what I need to do.
I like the simplicity of diff
and patch
but, again, need to preserve custom configurations.
Right now after some initial testing it looks like my only course of action is custom scripts and parsers unless anyone else has any suggestions and/or has done something like this in the past.