Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP]Colorize etc-update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
ka0ttic
Retired Dev
Retired Dev


Joined: 23 Oct 2003
Posts: 46
Location: Ormond Beach, FL

PostPosted: Sat Aug 07, 2004 6:44 am    Post subject: [TIP]Colorize etc-update Reply with quote

[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:

Code:
emerge colordiff


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
View user's profile Send private message
Chaosite
Guru
Guru


Joined: 13 Dec 2003
Posts: 540
Location: Right over here.

PostPosted: Sat Aug 07, 2004 7:57 am    Post subject: Reply with quote

Nice tip!

8)
Back to top
View user's profile Send private message
Wcc
n00b
n00b


Joined: 13 Apr 2003
Posts: 10

PostPosted: Tue Aug 10, 2004 10:27 pm    Post subject: Reply with quote

Might also want to have a look at /etc/colordiffrc . This will allow you to remove the annoying banner =P
Back to top
View user's profile Send private message
rex123
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 272

PostPosted: Thu Aug 12, 2004 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2066
Location: /usa/utah

PostPosted: Sat Oct 16, 2004 6:10 am    Post subject: Reply with quote

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
View user's profile Send private message
Hackeron
Guru
Guru


Joined: 01 Nov 2002
Posts: 307

PostPosted: Sat Oct 16, 2004 4:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum