The existing etc-update script from app-admin/gentoolkit lacks certain functionality, and requires customization. This script is an attempt to get rid of the weaknesses found in etc-update.
1) vim diff mode is not supported, and that's a no-no. Vim diff mode is great! sdiff may be good for someone who doesn't know vi, but most people who know vi would prefer vim diff mode, imo (and that's quite a lot of people, have you checked how popular vim is? :)). 2) gratuitous and silly graphics on a system script - no. Basically, if someone has vim installed, it should use vim diff mode. If not, it should use sdiff. There should also be a way to override this behavior for someone who has vim but wants to use sdiff anyway. In general, try to make it spam the user as little as possible output, while still retaining the content of what you need to communicate. sdiff is a cool idea! If you can ammend your changes to take into account 2 points above, I'd be happy to put it in :).
On the second thought, it should work with *any* tool that can take 2 files as input. Don't hardwire sdiff into it.
1) Actually, you are the first person i met who can actually work with vimdiff :) I know how popular vim is, i also know how popular other editors are (emacs anyone? ;)), and i know vim doesn't come with the base system. Basically i totally disagree with using vimdiff as default, but agree it should be an option to use whatever editor you like. 2) Agreed :) I hate it too, but i needed something to distinguish the diff from the menu, and this was the first thing that came to mind :) Other than that, it surely produces a lot less nonsense on the screen than vimdiff :-) Response to comment 2: Agreed, but i do think it needs a default tool. IMHO sdiff is a better default than vimdiff. (base system, easy, no-nonsense)
No one says vim diff mode should be default. I just want to go into your script, flip one variable and use vim diff mode. Is that possible? And from coding style point of view, I'd prefer not seeing "sdiff" hardwired somewhere where it doesn't need to be. I have nothing against your idea or even your take on my 2 points! :). I simply want my way of doing things to be supported in your alteration. Wouldn't that be considerate of you? I think it would be nice if you allow for using both sdiff and vim -d, no? Some people don't want sdiff. They want diff -u instead. Why can't this be supported as well? BTW, other people besides myself really like vim diff mode. Also, expect more and more people to like it, because it's a relatively new thing and not many people have even tried it yet! But, as vim 6.0 becomes old, it will be used more. In vim diff mode you can do something that you can't do with sdiff. You can edit files. You can merge things intelligently (like, in a non-straightforward ways). You see the changes in color. You get the unlimited undo if you make a mistake. You can jump to last difference first, and then go back to the first one, ie, it doesn't force the order in which you apply your diffs on you. There is a million reasons why vim diff mode is 100% superior to sdiff. However, as you say, sdiff is a very basic tool that's likely to be present on everyone's box and not everyone uses vim. I totally understand that. That's why I think using sdiff is really cool. However, this shouldn't negatively impact people who want to continue to use vim's diff mode.
Fantastic! I really like what you've done with the script. After playing with it a bit, I have commited it without further changes. I have bumped gentoolkit from 0.1.0 to 0.1.1. I did take the liberty to edit the "Author" line to make it more compact. Let me know if you have any objections. Thank you very much for your hard work.