janneand n00b
Joined: 13 Sep 2002 Posts: 48 Location: Stockholm, Sweden
|
Posted: Fri Dec 13, 2002 4:54 pm Post subject: Controlled emerge -u world |
|
|
You're not supposed to do 'emerge -u world' but if the list of updates is huge and you just want to exclude a few it's a hassle. Then the following script may be useful.
It reads from stdin, picks what looks like ebuild names (contains / and -) and send that to emerge, with any parameters sent to the script. That means you can do this...
Code: | emerge -up world > tmp |
Then you edit this in a texteditor to remove lines you don't want to include (by deleting them or by putting # at the beginning of the line) and then this...
Code: | cat tmp|listemerge -p |
You can also do things like this
Code: | emerge -p xfree|listemerge -p | I have hard to see the usefullness in that though.
-J
Code: | #!/bin/bash
# file: listemerge
# Reads input, picks out what looks like an ebuild,
# strips version and send to emerge.
awk '
{
if (substr($0, 0, 1) != "#")
for (i=1; i<=NF; i++) {
if (index ($i, "/")) {
numf=split($i, a, "-")
if (numf > 1) {
for (j=0; j<numf; j++) {
if (a[j] ~ /^[0-9]/)
break;
if (j>1)
printf "-"
printf a[j]
}
printf "\n"
}
next
}
}
} '|xargs emerge $@ |
|
|