[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: parsing changelog



Ludovic Brenta <ludovic@ludovic-brenta.org> writes:

> 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.

Sorry, I was experimenting; that's not the problem.

> * 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"

This works. Thanks.

> PS. Thanks for updating aunit.

And thanks for updating gnat :).

-- 
-- Stephe


Reply to: