3 # Script to generate API documentation and send it to sf.net
5 # Copyright 2009 Konstantin Dmitriev
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of
10 # the License, or (at your option) any later version.
12 USERNAME=your_username #set this to your sf.net username to publish api
13 #(you need privilegies for that)
15 export HTMLDIR=~/synfig/api/html
16 export SOURCEDIR=~/synfig/api/source
20 if [ ! -d $SOURCEDIR ]; then
21 mkdir -p `dirname $SOURCEDIR`
22 cd `dirname $SOURCEDIR`
23 git clone git://synfig.git.sourceforge.net/gitroot/synfig `basename $SOURCEDIR`
27 VERSION=`cat configure| egrep PACKAGE_VERSION=\'`
28 VERSION=${VERSION#*\'}
36 git checkout remotes/origin/master
38 for module in ETL synfig-core synfig-studio; do
40 autoreconf --install --force || sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' && autoreconf --install --force
42 cp -f doxygen.cfg.in doxygen.cfg
43 sed -i "s/@VERSION@/$VERSION/" doxygen.cfg
44 sed -i "s/@PACKAGE@/$module/" doxygen.cfg
46 rm -rf $HTMLDIR/$module
47 mv doc/html $HTMLDIR/$module
48 cp $SOURCEDIR/$module/trunk/doxygen.cfg $HTMLDIR/$module
54 cat > $HTMLDIR/index.html <<EOF
55 <html><head><title>ETL, synfig, synfigstudio API docs</title></head>
57 <h1>ETL, synfig, synfigstudio API docs</h1>
59 <li><a href="ETL/">ETL</a></li>
60 <li><a href="synfig/">synfig</a></li>
61 <li><a href="synfigstudio/">synfigstudio</a></li>
63 <p>Generated on: $DATE.</p>
67 #beep (because we asking password)
68 echo -e "\a"; sleep 0.2; echo -e "\a"; sleep 0.2; echo -e "\a"
71 rsync -avP -e ssh $HTMLDIR/ $USERNAME,synfig@web.sourceforge.net:htdocs/api/