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. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/46dd6c9bb6ed4f8e45fcb9ab4776d22b@localhost
