You are not logged in.

#1 2011-12-08 04:25:01

jakunar
Member
Registered: 2011-12-08
Posts: 7

[SOLVED] packer -Ss return package names

Hey everybody,

I am writing a a little script which automatizes some of my arch-setup..
Hence I want to provide this script to some of my friends it should me mostly automated.
Therefore the script needs capable of installing possible drivers just by getting a hint passed.

So here is the Question:

Is it possible to let packer return the exact package names when using the -Ss option?
Exact name of the package means just the package name without any information.


Example:

I want to install the drivers for a Epson printer and my only Information is "SX525WD. A normal search with packer looks like this:

 $ sudo packer -Ss SX525WD
aur/epson-inkjet-printer-workforce-635-nx625-series 1.0.1-6
    Epson printer driver (ME Office 82WD, 85ND, 900WD, 960FWD / Stylus NX625, SX525WD, SX620FW,
    TX560WD / Stylus Office B42WD, BX525WD, BX625FWD, TX620FWD / WorkForce T42WD, 60, 625, 630,
    633, 635)

But I would rather like a result like this:

 $ sudo packer -Ss SX525WD
epson-inkjet-printer-workforce-635-nx625-series

Is there a possible solution?

Thank you very much!
Jakunar

Last edited by jakunar (2011-12-08 06:50:49)

Offline

#2 2011-12-08 05:08:52

kyla
Member
From: Arlington, VA
Registered: 2011-03-12
Posts: 112
Website

Re: [SOLVED] packer -Ss return package names

I doubt there's a way to do it with packer itself, but it looks like something that shouldn't be very hard to do with regular expressions

EDIT: I don't know what you're writing the script in, but you could use regular expressions to identify the / in the output and then track until the space and that would give you the package name

Last edited by kyla (2011-12-08 05:11:09)

Offline

#3 2011-12-08 06:45:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] packer -Ss return package names

[karol@black ~]$ packer -Ssq SX525WD
epson-inkjet-printer-workforce-635-nx625-series

Offline

#4 2011-12-08 06:50:31

jakunar
Member
Registered: 2011-12-08
Posts: 7

Re: [SOLVED] packer -Ss return package names

Smokin' ****

That worked!!! Have only gotten halfway trying to implement some Perl code in my shell script.. but 1. it doesn't work and 2. it looks crappy..
Never used perl before..

Again: THX a lot!!!

Offline

Board footer

Powered by FluxBB