You are not logged in.
Maybe pacman could handle generic characters (like * or ?) in package names with the "sync" option.
For example:
"pacman -S alsa*" would allow to install all packages with a name beginning with "alsa"
"pacman -S sdl*"
"pacman -S net-*"
It seems it already works with the "add" and "upgrade" options, but it does not work with the "remove" and "query" options.
Why not something like:
"pacman -Q sdl*" or "pacman -Q *sdl"
to find out every package installed with a name beginning with "sdl" or finishing with "sdl"
Why not allow this for "sync", "query" and "remove" operations?
Offline
Well, here's how I do it:
$ cat > pacman.like
#!/bin/bash
for package in `pacman -Sl | sed 's:[a-z]* *([a-z,A-Z,0-9]*) *.*:1:' | sort -u | grep '^$1'`; do
pacman --noconfirm -S $package
done
^D <-- (Ctrl-D to exit 'cat')
CAUTION: Note the single-quote right after the "for package in " is a back-tick (the key to the left of "1/!" and "2/@") -- argh! just cut and paste...
Then:
$ chmod 755 pacman.like
Without the "--noconfirm" this is what you will get, for example (as root user):
# ./pacman.like 'xs'
Targets: xsane-0.96-1
Total Package Size: 1.5 MB
Proceed with upgrade? [Y/n] n
Targets: xscorch-0.2.0-1
Total Package Size: 0.3 MB
Proceed with upgrade? [Y/n] n
:: xscreensaver-4.20-1: is up to date. Upgrade anyway? [Y/n] n
Targets: xskat-4.0-1
Total Package Size: 0.1 MB
Proceed with upgrade? [Y/n] n
Targets: xsmbrowser-3.4.0-1
Total Package Size: 0.1 MB
Proceed with upgrade? [Y/n] n
Targets: xsnow-1.42-1
Total Package Size: 0.1 MB
Proceed with upgrade? [Y/n] n
Targets: icu-3.0-2 mono-1.0.6-1 xsp-1.0.5-1
Total Package Size: 18.3 MB
Proceed with upgrade? [Y/n] n
(was condensed to save BB space)
Offline
Well, here's how I do it:
$ cat > pacman.like #!/bin/bash for package in `pacman -Sl | sed 's:[a-z]* *([a-z,A-Z,0-9]*) *.*:1:' | sort -u | grep '^$1'`; do pacman --noconfirm -S $package done ^D <-- (Ctrl-D to exit 'cat')
hmmm how about:
#!/bin/bash
packages=""
for package in `pacman -Sl | sed 's:[a-z]* *([a-z,A-Z,0-9]*) *.*:1:' | grep '^$1'`; do
packages="$packages $package"
done
pacman -S $packages
a) I removed the sort call, as that doesn't matter, it just makes it slower
b) combined packages in one string to run pacman -S on, allowing one to confirm if they want
Offline
a) I removed the sort call, as that doesn't matter, it just makes it slower
Like it was so slow to begin with
Also, did you test it? The reason for the sort was pretty important. Try just part of the code:
pacman -Sl | sed 's:[a-z]* *([a-z,A-Z,0-9]*) *.*:1:'
Did you notice all these?
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
xpdf
("sort -u" creates a "unique" list...)
Nice option, though:
b) combined packages in one string to run pacman -S on, allowing one to confirm if they want
Offline
Like it was so slow to begin with
heh, I'm a glutton for that sort of stuff
("sort -u" creates a "unique" list...)
hmmm, `uniq` will do the same thing, without sorting the list...
Offline
heh, I'm a glutton for that sort of stuff
Me, too -- from habbits formed writing interrupt-driven drivers :shock: (Very timing intensive.)
hmmm, `uniq` will do the same thing, without sorting the list...
Yeah, but then it wouldn't run as slow...
Offline