mirror of https://github.com/BOINC/boinc.git
Fixes to nightly tarball generator.
Added export-tarball svn path=/trunk/boinc/; revision=8916
This commit is contained in:
parent
8b9023b6d2
commit
1db78537a5
|
@ -0,0 +1,107 @@
|
|||
#!/bin/sh
|
||||
|
||||
## $Id$
|
||||
|
||||
# Create a tarball from CVS or SVN export.
|
||||
|
||||
# example usage:
|
||||
|
||||
# CVSROOT=/usr/local/warez/cvsroot \
|
||||
# CHECKOUT='cvs export -r HEAD boinc' \
|
||||
# DIR='boinc' \
|
||||
# FILENAME_TGZ="boinc-cvs-TODAY.tar.gz" \
|
||||
# FILENAME_ZIP="boinc-cvs-TODAY.zip" \
|
||||
# DESTINATION="/disks/milkyway/a/users/anderson/boinc/doc/source/nightly/" \
|
||||
# /disks/philmor/a/users/quarl/bin/export-tarball
|
||||
|
||||
# CHECKOUT='svn export http://svn.quarl.org/repos/coursesurvey/trunk/coursesurvey' \
|
||||
# DIR=coursesurvey \
|
||||
# FILENAME_TGZ="coursesurvey-rSVNREVISION.tar.gz" \
|
||||
# FILENAME_ZIP="coursesurvey-rSVNREVISION.zip" \
|
||||
# DESTINATION="ftp://upload.sourceforge.net/incoming" \
|
||||
# /home/quarl/bin/export-tarball
|
||||
|
||||
# Note: requires GNU tar (if you want to use other tar need to separate gzip
|
||||
# step)
|
||||
|
||||
die()
|
||||
{
|
||||
echo "ERROR in $0 on `hostname`:"
|
||||
echo "$1"
|
||||
[ "$2" ] && cat "$2"
|
||||
exit 1
|
||||
}
|
||||
|
||||
reqeval()
|
||||
{
|
||||
test -n "$VERBOSE" && echo "Executing: $1"
|
||||
eval "$1" || die "error executing: $1"
|
||||
}
|
||||
|
||||
reqeval_log()
|
||||
{
|
||||
test -n "$VERBOSE" && echo "Executing: $1"
|
||||
eval "$1" > $2 2>&1 || die "error executing: $1" $2
|
||||
}
|
||||
|
||||
upload()
|
||||
{
|
||||
if echo "$DESTINATION" | grep '^ftp://' >/dev/null ; then
|
||||
ftp_upload "$1"
|
||||
else
|
||||
file_upload "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
file_upload()
|
||||
{
|
||||
test -n "$VERBOSE" && echo "Putting $1 in $DESTINATION"
|
||||
reqeval "mv $1 $DESTINATION"
|
||||
}
|
||||
|
||||
ftp_upload()
|
||||
{
|
||||
SERVER=`echo "$DESTINATION" | sed 's,^ftp://,,' | sed 's,/.*,,'`
|
||||
DIRECTORY=`echo "$DESTINATION" | sed 's,^ftp://[^/]*',,`
|
||||
|
||||
test -n "$VERBOSE" && echo "Uploading $1 to ftp site $SERVER $DIRECTORY"
|
||||
reqeval "ncftpput $SERVER $DIRECTORY $1"
|
||||
}
|
||||
|
||||
if [ -z "$USER" ]; then
|
||||
USER=$LOGNAME
|
||||
fi
|
||||
|
||||
if ttyo 2>/dev/null ; then
|
||||
VERBOSE=1
|
||||
fi
|
||||
|
||||
test -n "$CHECKOUT" || die "No CHECKOUT specified"
|
||||
test -n "$DIR" || die "No DIR specified"
|
||||
test -n "$FILENAME_TGZ" -o -n "$FILENAME_ZIP" || die "No FILENAME_TGZ nor FILENAME_ZIP specified"
|
||||
test -n "$DESTINATION" || die "No DESTINATION specified"
|
||||
|
||||
TMPDIR=/tmp/export-tarball-$$
|
||||
|
||||
reqeval "rm -rf $TMPDIR"
|
||||
reqeval "mkdir -p $TMPDIR"
|
||||
reqeval "cd $TMPDIR"
|
||||
reqeval_log "$CHECKOUT" checkout.log
|
||||
|
||||
test -d "$DIR" || die "No DIR $DIR after CHECKOUT"
|
||||
|
||||
TODAY=`date +%Y-%m-%d`
|
||||
# SVNREVISION=`svnlastchangedversion "$DIR" 2>/dev/null`
|
||||
|
||||
FILENAME_TGZ=`echo "$FILENAME_TGZ" | sed "s/TODAY/$TODAY/"`
|
||||
FILENAME_ZIP=`echo "$FILENAME_ZIP" | sed "s/TODAY/$TODAY/"`
|
||||
|
||||
# FILENAME_TGZ=`echo "$FILENAME_TGZ" | sed "s/SVNREVISION/$SVNREVISION/"`
|
||||
# FILENAME_ZIP=`echo "$FILENAME_ZIP" | sed "s/SVNREVISION/$SVNREVISION/"`
|
||||
|
||||
test -n "$FILENAME_TGZ" && reqeval_log "tar czvf $FILENAME_TGZ $DIR" tar.log
|
||||
test -n "$FILENAME_ZIP" && reqeval_log "zip -r9 $FILENAME_ZIP $DIR" zip.log
|
||||
upload $FILENAME_TGZ
|
||||
upload $FILENAME_ZIP
|
||||
|
||||
reqeval "rm -rf $TMPDIR"
|
|
@ -7,6 +7,8 @@
|
|||
# need to set PATH because we might be running from a cron job.
|
||||
# on our Solaris servers, cvs is in /opt/misc/bin
|
||||
|
||||
cd $HOME/boinc
|
||||
|
||||
if [ -d /disks/asimov ]; then
|
||||
PATH=/disks/philmor/a/users/quarl/local/Node-SOLARIS/bin:/disks/philmor/a/users/quarl/local/bin:/disks/philmor/a/users/quarl/bin:/usr/ccs/bin:/usr/local/cygnus:/disks/milkyway/a/users/anderson/seti/bin:/opt/misc/bin:/usr/ucb:/usr/bin:/usr/local/bin
|
||||
export PATH
|
||||
|
@ -17,13 +19,13 @@ CVSROOT=/usr/local/warez/cvsroot \
|
|||
DIR=boinc \
|
||||
FILENAME_TGZ="boinc-cvs-TODAY.tar.gz" \
|
||||
FILENAME_ZIP="boinc-cvs-TODAY.zip" \
|
||||
DESTINATION="/disks/milkyway/a/users/anderson/boinc/doc/source/nightly/" \
|
||||
/disks/philmor/a/users/quarl/bin/export-tarball
|
||||
DESTINATION="/home/boincadm/boinc/doc/source/nightly/" \
|
||||
./export-tarball
|
||||
|
||||
CVSROOT=/usr/local/warez/cvsroot \
|
||||
CHECKOUT='cvs export -r HEAD boinc_public && (cd boinc_public && ./_autosetup)' \
|
||||
DIR=boinc_public \
|
||||
FILENAME_TGZ="boinc_public-cvs-TODAY.tar.gz" \
|
||||
FILENAME_ZIP="boinc_public-cvs-TODAY.zip" \
|
||||
DESTINATION="/disks/milkyway/a/users/anderson/boinc/doc/source/nightly/" \
|
||||
/disks/philmor/a/users/quarl/bin/export-tarball
|
||||
CHECKOUT='cvs export -r stable boinc && (cd boinc && ./_autosetup)' \
|
||||
DIR=boinc \
|
||||
FILENAME_TGZ="boinc_stable-cvs-TODAY.tar.gz" \
|
||||
FILENAME_ZIP="boinc_stable-cvs-TODAY.zip" \
|
||||
DESTINATION="/home/boincadm/boinc/doc/source/nightly/" \
|
||||
./export-tarball
|
||||
|
|
Loading…
Reference in New Issue