diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-05-22 14:12:12 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-05-22 14:12:12 +0000 |
commit | 96dde76b99897352aa3d0877a0b621a9e605733e (patch) | |
tree | 4fdab47b4c9769405aa799bf65971c31abf2de6b /maketgz | |
parent | fb9d1ff00f76836dd66725de869656c5fa53b071 (diff) | |
download | curl-96dde76b99897352aa3d0877a0b621a9e605733e.tar.gz |
moved here from the newlib branch
Diffstat (limited to 'maketgz')
-rwxr-xr-x | maketgz | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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=<STDIN>;@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 |