X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=autobuild%2Fapi.sh;h=2c5e49eedfb6f539a09655be55acd935cbff45b6;hb=HEAD;hp=6a4326766e216d7a3bd3836fb0370d210eabf8a9;hpb=2dad2793a54098ce7c65a8796c8ddf2fc7569f24;p=synfig.git diff --git a/autobuild/api.sh b/autobuild/api.sh old mode 100755 new mode 100644 index 6a43267..2c5e49e --- a/autobuild/api.sh +++ b/autobuild/api.sh @@ -2,51 +2,71 @@ # # Script to generate API documentation and send it to sf.net # -# Copyright 2009 Konstantin Dmitriev +# Copyright 2009-2010 Konstantin Dmitriev +# Copyright 2010 Carlos López # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. +# +# This script has been redesigned to be used in a cron work. +# Adapt the following macros to the proper directories values. -USERNAME=your_username #set this to your sf.net username to publish api - #(you need privilegies for that) - -export HTMLDIR=~/synfig/api/html -export SOURCEDIR=~/synfig/api/source +export HTMLDIR=$HOME/synfig/synfig-repository/api +export SOURCEDIR=$HOME/synfig/synfig-repository/code/synfig set -e +#check for git and doxygen +if ! which git > /dev/null 2>&1; then + echo "Please install git." + exit +fi +if ! which doxygen > /dev/null 2>&1; then + echo "Please install doxygen." + exit +fi + +#fetching sources if [ ! -d $SOURCEDIR ]; then mkdir -p `dirname $SOURCEDIR` cd `dirname $SOURCEDIR` - git clone git://synfig.git.sourceforge.net/gitroot/synfig `basename $SOURCEDIR` + git clone --depth 1 git://synfig.git.sourceforge.net/gitroot/synfig/synfig `basename $SOURCEDIR` fi -getversion(){ - VERSION=`cat configure| egrep PACKAGE_VERSION=\'` - VERSION=${VERSION#*\'} - VERSION=${VERSION%\'} -} - mkdir -p $HTMLDIR cd $SOURCEDIR git fetch git checkout remotes/origin/master +#generating api to htmldir for module in ETL synfig-core synfig-studio; do -cd $module/trunk -autoreconf --install --force || sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' && autoreconf --install --force -getversion +cd $module +echo "Generating API for $module..." +case $module in + ETL) + MODULETITLE='Extended Template Library' + ;; + synfig-core) + MODULETITLE='Synfig Core' + ;; + synfig-studio) + MODULETITLE='Synfig Studio' + ;; +esac + VERSION=`cat configure.ac |egrep "AC_INIT\(\[$MODULETITLE\],"| sed "s|.*$MODULETITLE\],\[||" | sed "s|\],\[.*||"` + VERSION=${VERSION#*\'} + VERSION=${VERSION%\'} cp -f doxygen.cfg.in doxygen.cfg sed -i "s/@VERSION@/$VERSION/" doxygen.cfg sed -i "s/@PACKAGE@/$module/" doxygen.cfg doxygen doxygen.cfg rm -rf $HTMLDIR/$module mv doc/html $HTMLDIR/$module -cp $SOURCEDIR/$module/trunk/doxygen.cfg $HTMLDIR/$module -cd ../.. +cp $SOURCEDIR/$module/doxygen.cfg $HTMLDIR/$module +cd .. done #index.html @@ -56,17 +76,11 @@ cat > $HTMLDIR/index.html <

ETL, synfig, synfigstudio API docs

Generated on: $DATE.

EOF -#beep (because we asking password) -echo -e "\a"; sleep 0.2; echo -e "\a"; sleep 0.2; echo -e "\a" - -#push to sf.net -rsync -avP -e ssh $HTMLDIR/ $USERNAME,synfig@web.sourceforge.net:htdocs/api/ -