2 # Script to build release-archives with
5 echo "LIB version number?"
10 echo "CURL version number?"
13 HEADER
=include
/curl
/curl.h
17 # Replace version number in header file:
18 sed 's/#define LIBCURL_VERSION.*/#define LIBCURL_VERSION "'$libversion'"/g' $HEADER >$HEADER.new
20 # Save old header file
21 cp -p $HEADER $HEADER.old
24 mv $HEADER.new
$HEADER
26 # Replace version number in header file:
27 sed 's/#define CURL_VERSION.*/#define CURL_VERSION "'$curlversion'"/g' $CHEADER >$CHEADER.new
29 # Save old header file
30 cp -p $CHEADER $CHEADER.old
33 mv $CHEADER.new
$CHEADER
38 for part
in `echo $PATH| tr ':' ' '`; do
40 if [ -x "$path" ]; then
50 ############################################################################
52 # If we have autoconf we can just as well update configure.in to contain our
53 # brand new version number:
56 if { findprog autoconf
>/dev
/null
2>/dev
/null
; } then
57 echo "- No autoconf found, we leave configure as it is"
59 # Replace version number in configure.in file:
63 sed 's/^AM_INIT_AUTOMAKE.*/AM_INIT_AUTOMAKE(curl,"'$version'")/g' $CONF >$CONF.new
68 # Make new configure.in
71 # Update the configure script
76 ############################################################################
78 # automake is needed to run to make a non-GNU Makefile.in if Makefile.am has
82 if { findprog automake
>/dev
/null
2>/dev
/null
; } then
83 echo "- Could not find or run automake, I hope you know what you're doing!"
85 echo "Runs automake --include-deps"
86 automake
--include-deps
89 ############################################################################
91 # Now run make first to make the file dates decent and make sure that it
92 # compiles just before release!
103 # Get the left part of the dash (-)
104 new
=`echo $orig | cut -d- -f1`
106 # Build new directory name
109 # Tell the world what we're doing
110 echo "Copying files into distribution archive";
113 echo "Directory already exists!"
120 # Copy all relevant files, with path and permissions!
121 tar -cf - `cat FILES` |
(cd $n; tar -xBpf -)
123 # Create the distribution root Makefile from Makefile.dist
124 cp -p Makefile.dist
$n/Makefile
126 ############################################################################
128 # Replace @SHELL@ with /bin/sh in the Makefile.in files!
130 echo "Replace @SHELL@ with /bin/sh in the Makefile.in files"
132 for file in Makefile.
in lib
/Makefile.
in src
/Makefile.
in; do
134 sed "s:@SHELL@:/bin/sh:g" $in >$temp
139 # Tell the world what we're doing
140 echo "creates $n.tar.gz";
142 # Make a tar archive of it all
148 # Make it world readable
149 chmod a
+r
$n.
tar.gz
;
151 # Delete the temp dir