'pkg_search': A little wrapper script for searching/installing packages in OpenBSD - BSD

Users browsing this thread: 1 Guest(s)
Phyrne
Long time nixers
Sup guys, just a short thread this evening.

I wanted to share with you a little wrapper I've written for pkg_info & pkg_add that allows the user to search for and install packages in OpenBSD in a seamless and intuitive manner.

pkg_info and pkg_add are great tools on their own, but taped together with a few utils, they function really nicely as a single tool!

So I threw together pkg_search. It queries the package database for the given string, spits out a numbered list of results of package names containing the search string and offers the user the ability to install the desired package by providing the associated number.

[Image: example.png]

It has no dependancies, it's a simple little korn shell script that uses already included tools.

So, feel free to use it, change it, abuse it, do whatever. It's not supposed to be a replacement for anything, or a game-changer, just a useful little tool, I tend to use it whenever installing packages, so figured I'd share.

Feedback is appreciated of course!


Enjoy ;)
srp
Long time nixers
I will definitely install this when I get FreeBSD back on my laptop. Great job, also. :)
~Seraphim R.P.
the artistnixer formerly known as vypr formerly known as sticky
Phyrne
Long time nixers
(19-08-2013, 12:18 AM)sticky Wrote: I will definitely install this when I get FreeBSD back on my laptop. Great job, also. :)

Thanks sticky :) Though, I'm not sure how much good this'd do on FreeBSD, it's written for OpenBSD, using OpenBSD specific tools :p
yrmt
Grey Hair Nixers
Nice script Phyrne, I Will use it when I install OpenBSD some day.
Phyrne
Long time nixers
(19-08-2013, 10:52 AM)yrmt Wrote: Nice script Phyrne, i Will use it when I install OpenBSD some day.
Thanks broseph. Yeah do it! Still some improvements to come.
berk
Long time nixers
Grand invention. Thanks, hoping to use this on my OpenBSD install :)
Phyrne
Long time nixers
(19-08-2013, 05:47 PM)theconjuring Wrote: Grand invention. Thanks, hoping to use this on my OpenBSD install :)
Thanks man, it comes in handy :) Enjoy!
jobss
Long time nixers
Looks eggcelent! Kind of reminded of emerge search. Will eventually use this on my DragonFly BSD setup. <(^__^)>
The world is quaking from our Linux Thoughts!
Mafia
Long time nixers
Using this now(: thanks phyrne.
Phyrne
Long time nixers
(23-09-2013, 11:53 PM)Mafia Wrote: Using this now(: thanks phyrne.
No problem! Enjoy Mafia :)
ajac
Members
i like this!

i hope you dont mind but i forked it on github. i added an escape when 0 is entered, because sometimes i wasnt finding anything i wanted to install.
Phyrne
Long time nixers
Thanks ajac! Hm, I don't really mind, but do you really think that justifies forking it? Perhaps a pull request or even just a quick suggestion here would have sufficed :)
zr0
Members
i don't know about scripting but doesn't suppose to ask me for password when i hit the number of the program i want ?
yrmt
Grey Hair Nixers
That's because the script is calling pkg_add to install the program to /usr/local which needs permissions.
greduan
Long time nixers
Nice. I was looking for something like this. Thanks Phyrne. :)
Eduan / greduan
https://greduan.com
me@greduan.com
jmbi
Long time nixers
(03-05-2015, 12:55 PM)greduan Wrote: Nice. I was looking for something like this. Thanks Phyrne. :)

Holy necrobump
ThePlantMan
Members
I just pull up the /pub/OpenBSD/5.7/packages/`machine -a` directory of my chosen mirror in a browser window and Ctrl+F to see if what I want is in packages. Or pkg_add -n and take a wild guess at the name.
greduan
Long time nixers
jmbi: whoopsie. lol
Eduan / greduan
https://greduan.com
me@greduan.com
bsdkeith
Long time nixers
If I want to check out what programs are available for OpenBSD, I go to http://ports.su/