View previous topic :: View next topic |
Author |
Message |
ka0ttic Retired Dev


Joined: 23 Oct 2003 Posts: 46 Location: Ormond Beach, FL
|
Posted: Sat Aug 07, 2004 6:44 am Post subject: [TIP]Colorize etc-update |
|
|
[TIP]Colorize etc-update
Ever wish it was easier to see what the changes are between configfileX.old and configfileX.new?
Well, it can be with this easy tip:
Next, edit /etc/etc-update.conf and change
Code: | diff_command="diff -uN %file1 %file2" |
to
Code: | diff_command="colordiff -uN %file1 %file2" |
and that's it... Enjoy ;P
Cheers |
|
Back to top |
|
 |
Chaosite Guru


Joined: 13 Dec 2003 Posts: 540 Location: Right over here.
|
Posted: Sat Aug 07, 2004 7:57 am Post subject: |
|
|
Nice tip!
 |
|
Back to top |
|
 |
Wcc n00b

Joined: 13 Apr 2003 Posts: 10
|
Posted: Tue Aug 10, 2004 10:27 pm Post subject: |
|
|
Might also want to have a look at /etc/colordiffrc . This will allow you to remove the annoying banner =P |
|
Back to top |
|
 |
rex123 Apprentice

Joined: 21 Apr 2004 Posts: 272
|
Posted: Thu Aug 12, 2004 10:13 am Post subject: |
|
|
Or... you could use vimdiff. If you don't use vi/vim, this is a good reason to learn. If you do use vi/vim, this is essential. Unless you're a dispatch-conf user, I guess.
The main advantage, apart from the fact that you automatically get a side-by-side coloured diff, is that you can edit the files there and then.
Code: |
diff_command="vim -d %file1 %file2"
using_editor=1
|
|
|
Back to top |
|
 |
beandog Bodhisattva


Joined: 04 May 2003 Posts: 2066 Location: /usa/utah
|
Posted: Sat Oct 16, 2004 6:10 am Post subject: |
|
|
And for those of us who live dangerously, delete the -i options in Code: | # arguments used whenever rm is called
# arguments used whenever mv is called
# arguments used whenever cp is called |
_________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
 |
Hackeron Guru

Joined: 01 Nov 2002 Posts: 307
|
Posted: Sat Oct 16, 2004 4:49 pm Post subject: |
|
|
People still use etc-update? -- the also supplied dispatch-conf seems to do a much better job:
* uses rcs to store revisions of all config files in /etc/config-archive
* auto merges comments
* only shows changes that have any affect
* auto merges unchanged files
* auto merges files comprising only CVS interpolations
Why would anyone still use etc-update?
PS, I use diff="colordiff -Nu %s %s" in my /etc/dispatch-conf.conf
And a word of working, if settings use-rcs to yes -- make sure you emerge rcs first or your pending configs will be deleted! |
|
Back to top |
|
 |
|