As I am currently setting up a new server, I thought it would be a good idea to keep most of the configuration files (e.g. /etc
) under version control. RCS comes in handy to achieve just that, but laziness requires some kind of script to make its use convenient 😉
So I sat down and wrote this little Bash script for my Debian system (Ubuntu and Knoppix should work as well then). Please note that you may have to change the shebang line, you also may have to adjust the command to call the file editor. I am using the nice “alternatives”-mechanism of Debian by calling editor
instead of any specific editor. For example I’ve found myself disliking vi
, while others swear an oath that vi
is the best editor around. In any case, this problem should not exist if you have set your favorite editor.
If you have no clue what I am talking about, use:
man update-alternatives
Alright, now that you have set your favorite editor for sure, go and make sure to install the rcs
and diff
packages by issuing (as super-user):
apt-get update && apt-get install rcs diff
… either you’ll have it installed or you will install them with these commands. There shouldn’t be any unsatisfied dependencies on any “normal” system apart from those packages themselves (and even diff
would be on most systems already).
Continue reading →