Chris 'Xenon' Hanson wrote:

While poking around, I see that there is a package for a static version of bash:

ftp://ftp.openbsd.org//pub/OpenBSD/3.8/packages/i386/bash-3.0.16p1-static.tgz

2. For an automated installer, how would the installer know where to get the proper package? The URL above works for 3.8, but will be wrong for 3.9. Is there an environment variable or string that the installer can expand to get the "3.8" or "3.9" portion of the URL? And then, how does it figure out the exact package filename for the static version of bash for a OS release it's never seen before? Without a heavy-duty web search,how would it know that the 3.8 static release of bash was named bash-3.0.16p1-static.tgz? It'd be nice if the script doesn't immediately break and need updating when 3.9 comes out.

Try something like this (combine wrapped lines as needed):

$ ftp "ftp://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/bash-*-static.tgz"
$ sudo pkg_add ./bash-*-static.tgz

/Alexander

Reply via email to