projects
/
synfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93fd70f
)
Adapt the api.sh script to be run in a cron job within tuxfamily shell.
author
Carlos Lopez
<genetita@gmail.com>
Wed, 23 Jun 2010 17:31:07 +0000
(19:31 +0200)
committer
Carlos Lopez
<genetita@gmail.com>
Wed, 23 Jun 2010 17:31:07 +0000
(19:31 +0200)
autobuild/api.sh
[changed mode: 0755->0644]
patch
|
blob
|
history
diff --git
a/autobuild/api.sh
b/autobuild/api.sh
old mode 100755
(executable)
new mode 100644
(file)
index
8cd2355
..
2c5e49e
--- a/
autobuild/api.sh
+++ b/
autobuild/api.sh
@@
-2,15
+2,19
@@
#
# Script to generate API documentation and send it to sf.net
#
#
# 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 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.
-export HTMLDIR=$HOME/synfig/
api/html
-export SOURCEDIR=$HOME/synfig/
api/source
+export HTMLDIR=$HOME/synfig/
synfig-repository/api
+export SOURCEDIR=$HOME/synfig/
synfig-repository/code/synfig
set -e
set -e
@@
-28,15
+32,9
@@
fi
if [ ! -d $SOURCEDIR ]; then
mkdir -p `dirname $SOURCEDIR`
cd `dirname $SOURCEDIR`
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
fi
-getversion(){
- VERSION=`cat configure| egrep PACKAGE_VERSION=\'`
- VERSION=${VERSION#*\'}
- VERSION=${VERSION%\'}
-}
-
mkdir -p $HTMLDIR
cd $SOURCEDIR
mkdir -p $HTMLDIR
cd $SOURCEDIR
@@
-45,18
+43,30
@@
git checkout remotes/origin/master
#generating api to htmldir
for module in ETL synfig-core synfig-studio; do
#generating api to htmldir
for module in ETL synfig-core synfig-studio; do
-cd $module
/trunk
+cd $module
echo "Generating API for $module..."
echo "Generating API for $module..."
-autoreconf --install --force || ( sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' configure.ac && autoreconf --install --force )
-getversion
+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 -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
done
#index.html
@@
-66,20
+76,11
@@
cat > $HTMLDIR/index.html <<EOF
<body>
<h1>ETL, synfig, synfigstudio API docs</h1>
<ul>
<body>
<h1>ETL, synfig, synfigstudio API docs</h1>
<ul>
-<li><a href="ETL/">ETL</a></li>
-<li><a href="synfig
/">synfig
</a></li>
-<li><a href="synfig
studio/">synfig
studio</a></li>
+<li><a href="ETL/
index.html
">ETL</a></li>
+<li><a href="synfig
-core/index.html">synfig-core
</a></li>
+<li><a href="synfig
-studio/index.html">synfig-
studio</a></li>
</ul>
<p>Generated on: $DATE.</p>
</body></html>
EOF
</ul>
<p>Generated on: $DATE.</p>
</body></html>
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/
-