Joey == Joey Hess [EMAIL PROTECTED] writes:
Joey expr `dpkg-parsechangelog` : '.*Version: \(.*\).*\nDistribution:'
I can't get that to work. I have much better luck with `gawk'.
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] .
Trouble?
Joey == Joey Hess [EMAIL PROTECTED] writes:
Karl Also, to put a version string into a program, I use:
VERSION=$(shell dpkg-parsechangelog 2/dev/null \
| gawk -F: \
'$$1 ~ /Version/ {version = gensub(/^ */,,g,$$2)} \
END {printf(%s_SPI, version) }')
Joey I've definitly
Karl M. Hegbloom wrote:
Note that I use `dpkg-parsechangelog', rather than the simpler:
LINE=$(head -1 changelog)
VERSION=$(expr $LINE : '.* (\(.*\))')
... since I thought that the reason for using `dpkg-parsechangelog'
was so folks could experiment with alternative changelog formats.
Joey == Joey Hess [EMAIL PROTECTED] writes:
Joey Karl M. Hegbloom wrote:
Note that I use `dpkg-parsechangelog', rather than the simpler:
LINE=$(head -1 changelog) VERSION=$(expr $LINE : '.* (\(.*\))')
... since I thought that the reason for using
Karl M. Hegbloom wrote:
Well, I'm glad you wrote it the way you did. I've just begun to
learn how shell scripts are written and that's the first time I'd
encountered that use of `expr'. I learned from it.
Same here, I stole that bit from debstd. ;-)
However, on second thought, using
Joey == Joey Hess [EMAIL PROTECTED] writes:
Joey However, on second thought, using dpkg-parsechangelog is
Joey unappetising. Not only does it print out this annoying error
Joey message, but it takes a about a second to run. (on a p166)
Joey Since debian/rules files that use
Karl M. Hegbloom wrote:
Maybe you could do it once, in the rules file:
export PKG_VERSION=$(shell dh_parseversion)
... and then use it from the environment.
I don't want the dh_* to be dependant on the particular debian/rules
they are in. They should be able to be added, singly, to rules
Karl M. Hegbloom wrote:
I find that if you put:
.EXPORT_ALL_VARIABLES:
... into debian/rules, the DH_VERBOSE=1 starts to function.
Thats unnecessary, you only need to export DH_VERBOSE. The example rules
files that come with debhelper do it this way:
#export DH_VERBOSE=1
Also, to put
I find that if you put:
.EXPORT_ALL_VARIABLES:
... into debian/rules, the DH_VERBOSE=1 starts to function.
Also, to put a version string into a program, I use:
VERSION=$(shell dpkg-parsechangelog 2/dev/null
\
| gawk -F:
9 matches
Mail list logo