Ralph Mitchell's update that allows this script to take an existing

directory name and build/run/test curl in there instead of trying to update
from CVS. Using this approach, this script can be used to test daily tarballs
etc.
This commit is contained in:
Daniel Stenberg 2003-11-07 08:06:03 +00:00
parent b1aa8eb7ef
commit 3de511b248
1 changed files with 85 additions and 60 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
########################### ###########################
# What is This Script? # What is This Script?
########################### ###########################
@ -11,12 +12,26 @@
# curl site, at http://curl.haxx.se/auto/ # curl site, at http://curl.haxx.se/auto/
# USAGE: # USAGE:
# testcurl.sh > output # testcurl.sh [curl-daily-name] > output
# Updated:
# v1.1 6-Nov-03 - to take an optional parameter, the name of a daily-build
# directory. If present, build from that directory, otherwise
# perform a normal CVS build.
# version of this script # version of this script
version=1 version=1.1
fixed=0 fixed=0
# Determine if we're running from CVS or a canned copy of curl
if [ "$#" -ge "1" -a "$1" ]; then
CURLDIR=$1
CVS=0
else
CURLDIR="curl"
CVS=1
fi
LANG="C" LANG="C"
export LANG export LANG
@ -29,6 +44,8 @@ die(){
if [ -f setup ]; then if [ -f setup ]; then
. "./setup" . "./setup"
infixed="$fixed" infixed="$fixed"
else
infixed=0 # so that "additional args to configure" works properly first time...
fi fi
if [ -z "$name" ]; then if [ -z "$name" ]; then
@ -80,13 +97,16 @@ echo "testcurl: date = `date -u`"
ipwd=`pwd` ipwd=`pwd`
pwd=`echo $ipwd | sed -e 's/$//g'` pwd=`echo $ipwd | sed -e 's/$//g'`
if [ -d curl -a -d curl/CVS ]; then if [ -d "$CURLDIR" ]; then
if [ $CVS -eq 1 -a -d $CURLDIR/CVS ]; then
echo "testcurl: curl is verified to be a fine source dir" echo "testcurl: curl is verified to be a fine source dir"
elif [ $CVS -eq 0 -a -f $CURLDIR/testcurl.sh ]; then
echo "testcurl: curl is verified to be a fine daily source dir"
else else
echo "testcurl: curl is not a source dir checked out from CVS!" echo "testcurl: curl is not a daily source dir or checked out from CVS!"
die die
fi fi
fi
build="build-$$" build="build-$$"
# remove any previous left-overs # remove any previous left-overs
@ -103,8 +123,10 @@ else
fi fi
# get in the curl source tree root # get in the curl source tree root
cd curl cd $CURLDIR
# Do the CVS thing, or not...
if [ $CVS -eq 1 ]; then
echo "testcurl: update from CVS" echo "testcurl: update from CVS"
cvsup() { cvsup() {
@ -159,6 +181,7 @@ rm -rf autom4te.cache
# generate the build files # generate the build files
./buildconf 2>&1 ./buildconf 2>&1
fi
if [ -f configure ]; then if [ -f configure ]; then
echo "testcurl: configure created" echo "testcurl: configure created"
@ -171,7 +194,7 @@ fi
cd "../$build" cd "../$build"
# run configure script # run configure script
../curl/configure $confopts 2>&1 ../$CURLDIR/configure $confopts 2>&1
if [ -f lib/Makefile ]; then if [ -f lib/Makefile ]; then
echo "testcurl: configure seems to have finished fine" echo "testcurl: configure seems to have finished fine"
@ -191,7 +214,7 @@ if { grep USE_ARES lib/config.h; } then
# run the ares configure # run the ares configure
cd ares cd ares
../../curl/ares/configure 2>&1 ../../$CURLDIR/ares/configure 2>&1
echo "testcurl: build ares" echo "testcurl: build ares"
make make
@ -220,8 +243,10 @@ else
echo "testcurl: the tests were successful!" echo "testcurl: the tests were successful!"
fi fi
if [ $CVS -eq 1 ]; then
# store the cvs status for the next time # store the cvs status for the next time
mv $newstat $oldstat mv $newstat $oldstat
fi
# get out of dir # get out of dir
cd .. cd ..