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 export HTMLDIR=$HOME/synfig/api/html
13 export SOURCEDIR=$HOME/synfig/api/source
17 #check for git and doxygen
18 if ! which git > /dev/null 2>&1; then
19 echo "Please install git."
22 if ! which doxygen > /dev/null 2>&1; then
23 echo "Please install doxygen."
28 if [ ! -d $SOURCEDIR ]; then
29 mkdir -p `dirname $SOURCEDIR`
30 cd `dirname $SOURCEDIR`
31 git clone git://synfig.git.sourceforge.net/gitroot/synfig `basename $SOURCEDIR`
35 VERSION=`cat configure| egrep PACKAGE_VERSION=\'`
36 VERSION=${VERSION#*\'}
44 git checkout remotes/origin/master
46 #generating api to htmldir
47 for module in ETL synfig-core synfig-studio; do
49 echo "Generating API for $module..."
50 autoreconf --install --force || ( sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' configure.ac && autoreconf --install --force )
52 cp -f doxygen.cfg.in doxygen.cfg
53 sed -i "s/@VERSION@/$VERSION/" doxygen.cfg
54 sed -i "s/@PACKAGE@/$module/" doxygen.cfg
56 rm -rf $HTMLDIR/$module
57 mv doc/html $HTMLDIR/$module
58 cp $SOURCEDIR/$module/trunk/doxygen.cfg $HTMLDIR/$module
64 cat > $HTMLDIR/index.html <<EOF
65 <html><head><title>ETL, synfig, synfigstudio API docs</title></head>
67 <h1>ETL, synfig, synfigstudio API docs</h1>
69 <li><a href="ETL/">ETL</a></li>
70 <li><a href="synfig/">synfig</a></li>
71 <li><a href="synfigstudio/">synfigstudio</a></li>
73 <p>Generated on: $DATE.</p>
77 #beep (because we asking password)
78 echo -e "\a"; sleep 0.2; echo -e "\a"; sleep 0.2; echo -e "\a"
80 echo -n "Enter your sf.net username: "
84 rsync -avP -e ssh $HTMLDIR/ $USERNAME,synfig@web.sourceforge.net:htdocs/api/