die()
{
echo '*** ERROR ***' $*
exit 1
}
if [ $# -lt 2 ] ; then
echo 'USAGE : uploadRelease LABEL SF_USER'
echo ' LABEL is the label for the release'
echo ' SF_USER is your Sourceforge user name (must have admin, and ssh key in your agent)'
exit 1
fi
LABEL=$1; shift
SF_USER=$1; shift
RSYNC='rsync'
RSYNCOPTS='-v -e ssh'
SF_MACHINE='frs.sourceforge.net'
SF_TOPDIR='/home/frs/project/openfx'
SFWEB_MACHINE='web.sourceforge.net'
SFWEB_TOPDIR='/home/project-web/openfx/htdocs'
set -x
$RSYNC $RSYNCOPTS *.tar.gz $SF_USER@$SF_MACHINE:$SF_TOPDIR/openfx/openfx-$LABEL/
$RSYNC $RSYNCOPTS release-notes.md $SF_USER@$SF_MACHINE:$SF_TOPDIR/openfx/openfx-$LABEL/readme.md
tar zcf Documentation/ofxDoxygenDocs_$LABEL.tgz doc
tar zcf Documentation/ofxProgrammingReference_$LABEL.tgz Documentation/Reference
scp website/htdocs/index.html \
$SF_USER@$SFWEB_MACHINE:$SFWEB_TOPDIR/index.html
scp website/htdocs/Documentation/index.html \
$SF_USER@$SFWEB_MACHINE:$SFWEB_TOPDIR/Documentation/index.html
$RSYNC -az $RSYNCOPTS \
Documentation/ofxProgrammingReference.html \
Documentation/ofxProgrammingGuide.html \
Documentation/ofxProgrammingReference_$LABEL.tgz \
Documentation/ofxDoxygenDocs_$LABEL.tgz \
Documentation/Reference \
Documentation/sourceforge/index.html \
$SF_USER@$SFWEB_MACHINE:$SFWEB_TOPDIR/Documentation/$LABEL
$RSYNC -az $RSYNCOPTS doc/ \
$SF_USER@$SFWEB_MACHINE:$SFWEB_TOPDIR/Documentation/$LABEL/Doxygen