Re: parsing changelog
Stephen Leake wrote:
> export debversion := $(shell dpkg-parsechangelog | sed -n -e
"s/^Version: [0123456789.]+-\([0123456789]+\)$$/\1/p")
>
> However, this doesn't work; 'debversion' is always a null string.
>
> This is based on a similar expression for soversion, that does work:
>
> soversion := $(shell sed -n -e "s/^Package:
libaunit\([0123456789]\+\)$$/\1/p" debian/control)
* the sed that works has a backslash before the '+'; the sed that doesn't
lacks this backslash.
* consider using sed -r and extended regular expressions; this will remove
the need for these backslashes. I think this would work:
dpkg-parsechangelog | sed -r -n -e "s/^Version:
[0123456789.]+-([0123456789]+)$$/\1/p"
HTH
PS. Thanks for updating aunit.
--
Ludovic Brenta.
Reply to: