Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto: reorder your /etc/make.conf USE flags alphabetically
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Sun May 18, 2008 2:15 am    Post subject: Reply with quote

You can seperate USE-flags using \'s.

Example:

USE="X alsa \
foo bar"

I don't know if you can add a comment to the end of the line doing this, though.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Wed May 28, 2008 11:48 pm    Post subject: Reply with quote

I would do:
Code:
. /etc/make.conf && echo $USE | tr ' ' '\n' | sort | tr '\n' ' '
Back to top
View user's profile Send private message
ZyX I
n00b
n00b


Joined: 15 Jan 2008
Posts: 7

PostPosted: Wed Jun 04, 2008 3:10 pm    Post subject: Reply with quote

What about this code (USE flags with explanations):
Code:
USEDESCLIST=$(slocate .desc | grep -P '/use\.([^/]+\.)?desc' || find /usr -name 'use.*desc') ; echo "$(source /etc/make.conf && echo $USE | awk '{ for(i=NF;i>0;i--) print $i }' | sort)" | while read i ; do echo -ne "USE=\"\${USE} $i\" # " ; cat $USEDESCLIST | grep -P "^$(echo $i | sed 's/^-//')[[:blank:]]" || echo "" ; done
By the way, I have my USE flags written like that:
Code:
USE="X alsa
foo bar"
(without backslash before newline) and it works. However, I put almost all flags in /etc/portage/package.use
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
Goto page Previous  1, 2
Page 2 of 2

 
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