From 96dde76b99897352aa3d0877a0b621a9e605733e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 May 2000 14:12:12 +0000 Subject: moved here from the newlib branch --- maketgz | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'maketgz') diff --git a/maketgz b/maketgz index 6ad429b5d..79982d0d3 100755 --- a/maketgz +++ b/maketgz @@ -7,15 +7,24 @@ read version libversion="$version" +# +# Now we have a section to get the major, minor and patch number from the +# full version string. We create a single hexadecimal number from it '0xMMmmpp' +# +perl='$a=;@p=split("\\.",$a);for(0..2){printf STDOUT ("%02x",$p[0+$_]);}'; + +numeric=`echo $libversion | perl -e "$perl"` + echo "CURL version number?" read curlversion HEADER=include/curl/curl.h CHEADER=src/version.h - # Replace version number in header file: -sed 's/#define LIBCURL_VERSION.*/#define LIBCURL_VERSION "'$libversion'"/g' $HEADER >$HEADER.new +sed -e 's/^#define LIBCURL_VERSION .*/#define LIBCURL_VERSION "'$libversion'"/g' \ + -e 's/^#define LIBCURL_VERSION_NUM .*/#define LIBCURL_VERSION_NUM 0x'$numeric'/g' \ + $HEADER >$HEADER.new # Save old header file cp -p $HEADER $HEADER.old -- cgit v1.2.3