On Thu, Jun 24, 2004 at 03:21:07PM +1000, Andrew Pollock wrote: > On Thu, Jun 24, 2004 at 02:25:11AM +0100, Scott James Remnant wrote: > > [snip] > > > Upstream versions with hyphens work fine, only the last hyphen is > > removed to extract the Debian revision. I've maintained a package with > > one for ages and never tripped over a buggy tool. > > > > While we're at it, what is a good way of extracting the upstream version out > of a version string that contains the Debian revision? If you've already got the version string itself isolated, here's a way to do it in the shell: Assuming the version number is in $VERSION... ${VERSION%-*} This is POSIX/SUSv3-conformant syntax. $ man ash /Parameter Expansion ...to learn more. -- G. Branden Robinson | If I recall correctly, devfs went Debian GNU/Linux | straight from being marked as branden@debian.org | EXPERIMENTAL to OBSOLETE in the http://people.debian.org/~branden/ | kernel config. -- Tore Anderson
Attachment:
signature.asc
Description: Digital signature