From d7342f658534a6a4e7758b404e655b8b6e80355c Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Sat, 20 Jun 2009 11:13:04 +0700 Subject: [PATCH] API generation script update. - replaced ~ with $HOME - fixed AC_CONFIG_SUBDIRS exception - checks for doxygen and git available at the start - ask sf.net username at runtime --- autobuild/api.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/autobuild/api.sh b/autobuild/api.sh index 6a43267..8cd2355 100755 --- a/autobuild/api.sh +++ b/autobuild/api.sh @@ -9,14 +9,22 @@ # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. -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/api/html +export SOURCEDIR=$HOME/synfig/api/source 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` @@ -35,9 +43,11 @@ 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 +echo "Generating API for $module..." +autoreconf --install --force || ( sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' configure.ac && autoreconf --install --force ) getversion cp -f doxygen.cfg.in doxygen.cfg sed -i "s/@VERSION@/$VERSION/" doxygen.cfg @@ -67,6 +77,9 @@ EOF #beep (because we asking password) echo -e "\a"; sleep 0.2; echo -e "\a"; sleep 0.2; echo -e "\a" +echo -n "Enter your sf.net username: " +read USERNAME + #push to sf.net rsync -avP -e ssh $HTMLDIR/ $USERNAME,synfig@web.sourceforge.net:htdocs/api/ -- 2.7.4