Charles Plessy <[EMAIL PROTECTED]> writes:

> When ran in the shell or in a $$() construct,
> dpkg-parsechangelog | grep Ver | perl -ne '/\s(.*?)\-/ ; print $1'
> gives me the upstream version number of my package.

> Howerver, the following expression does not work as expected in
> debian/rules:

> VERSION=$(shell (dpkg-parsechangelog | grep Ver | perl -ne '/\s(.*?)\-/ ; 
> print $1'))

> Apparently, the perl oneliner returns the whole string. Is there a
> cleaner method to get the upstream version number in debian/rules ?

I use:

version := $(shell dpkg-parsechangelog | grep ^Version: \
                 | cut -d' ' -f2 | cut -d- -f1)

I'm guessing the problem with the Perl one-liner is that you need to
double the $ in $1 since you're inside make.

-- 
Russ Allbery ([EMAIL PROTECTED])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to