You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Hyde <bh...@gensym.com> on 1998/03/18 20:28:29 UTC
re: grabbing latest from dev/from-cvs
My script below.
>From time to time I point out that the names in
http://dev.apache.org/from-cvs are crummy. They
should include the actual cvs module name. All
the forks should be in there. I do not mind that
are hard to predict.
- ben hyde
---
#!/bin/csh -f
alias bailQ 'if($status) goto bail'
if ( `machine` != sun4 ) then
echo LOG: 'ERROR: not SUNOS. Need tools not usually installed on solarius.'
exit 1
endif
set force = 0
if ( "$1" == '-force' ) set force = 1
# Parameters
set module = apache-1.3
set place = /home/bhyde/junk/stage
set lynx = /home/bhyde/local/bin/lynx
set url = http://dev.apache.org/from-cvs
echo LOG: Fetching $module into $place
cd $place
set filename = `$lynx -source $url | grep 'apache_' | tail -1 | sed -e 's/^.*HREF="//' -e 's/".*//'`
set stamp = "$filename"
if ( $force || ! -e stamp ) then
echo restart > stamp
endif
set oldStamp = `cat stamp`
if( "$stamp" == "$oldStamp" ) then
echo LOG: no change
exit 0
else
echo LOG: changed: $stamp
echo "$stamp" > stamp
endif
# Let's do it.
echo LOG: set old to writable
if ( -e $module ) then
find $module -exec chmod u+w {} \;
rm -rf $module
endif
mkdir $module
echo LOG: Fetching $filename
set echo
cd $module
$lynx -source $url/$filename \
| gzip --decompress \
| tar -xf -
bailQ
cd $place
# Discard the CVS data in the sandbox, since this isn't a CVS sandbox
find $module -name CVS -print | sed 's/^/rm -rf /' | sh -v
echo LOG: Fetched $module into $place
exit 0;
bail:
echo ERROR: Nonzero status, failing.
exit 1