From: g0dil Date: Fri, 20 Apr 2007 06:54:33 +0000 (+0000) Subject: Added admin scripts to repository X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=7e21d703488f0a9c31bc3ac09f75626693fa5a7d;p=senf.git Added admin scripts to repository git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@229 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 3d952f4..807596a 100644 --- a/SConstruct +++ b/SConstruct @@ -36,9 +36,11 @@ SConscript(glob.glob("*/SConscript")) SENFSCons.StandardTargets(env) SENFSCons.GlobalTargets(env) -SENFSCons.Doxygen(env, extra_sources = [ - 'Examples/Sniffer/Sniffer.cc', -]) +SENFSCons.Doxygen(env) + +#, extra_sources = [ +# 'Examples/Sniffer/Sniffer.cc', +#]) SENFSCons.DoxyXRef(env, HTML_HEADER = '#/doclib/doxy-header-overview.html', HTML_FOOTER = '#/doclib/doxy-footer.html') diff --git a/admin/build.sh b/admin/build.sh new file mode 100755 index 0000000..eba2421 --- /dev/null +++ b/admin/build.sh @@ -0,0 +1,51 @@ +#!/bin/sh -e + +cd /home/senf/src + +rm -f build.log ../upload.log +touch build.log ../upload.log + +trap 'exec >/dev/null 2>&1; cat build.log ../upload.log 1>&3; exit 1' ERR + +exec 3>&1 >build.log 2>&1 + +echo -n '# Starting build at '; date --utc + +if [ "$1" == "-c" ]; then + echo '$ find -mindepth 1 -maxdepth 1 ! -name .svn | xargs rm -rf' + find -mindepth 1 -maxdepth 1 ! -name .svn ! -name build.log | xargs rm -rf +fi + +echo '$ svn update' +svn update | tee ../svn-update.log +if grep -qv '^At ' ../svn-update.log; then + echo '$ rm -f doc/html/html.stamp' + rm -f doc/html/html.stamp +fi +rm -f ../svn-update.log + +echo '$ scons -k all' +scons -k all +echo -n '# Build completed at '; date --utc + +exec >../upload.log 2>&1 + +if [ "$1" == "-c" ]; then + cp build.log build-full.log +fi + +echo -n '# Upload started at '; date --utc +rsync -rzv --del --delete-excluded \ + --filter="- .svn" \ + --filter="+ */" \ + --filter="+ *.html" \ + --filter="+ *.css" \ + --filter="+ *.png" \ + --filter="+ *.php" \ + --filter="+ *.log" \ + --filter="- *" \ + . g0dil@shell.berlios.de://home/groups/senf/htdocs/src +echo -n '# Upload completed at '; date --utc + +exec >/dev/null 2>&1 +scp ../upload.log g0dil@shell.berlios.de:/home/groups/senf/htdocs/upload.log diff --git a/admin/dump.sh b/admin/dump.sh new file mode 100755 index 0000000..2ce15ac --- /dev/null +++ b/admin/dump.sh @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# Dump the complete subversion repository from berlios into the dumps/ folder + +target=`date +'%Y%m%d.dump.gz'` +dumpdir=/home/senf/dumps +log=/home/senf/dump.log +keep=4 + +########################################################################### + +trap 'exec >/dev/null 2>&1; cat $log 1>&3; exit 1' ERR +exec 3>&1 >$log 2>&1 + +cd $dumpdir +ssh g0dil@svn.berlios.de "svnadmin dump /svnroot/repos/senf -r 1:HEAD | gzip" >$target +ls | sort -r | sed -e "1,${keep}d" | xargs -r rm diff --git a/senfscons/Dia2Png.py b/senfscons/Dia2Png.py index c20e6c7..3e5f0fe 100644 --- a/senfscons/Dia2Png.py +++ b/senfscons/Dia2Png.py @@ -19,7 +19,7 @@ # \ingroup builder import os -import SCons.Builder +import SCons.Builder, SCons.Action def dia_getSize(env,source): size = None @@ -39,7 +39,7 @@ def dia2png_generator(source, target, env, for_signature): if size[0] > env['DIA2PNGMAXWIDTH']: size[1] = size[1]*env['DIA2PNGMAXWIDTH']/size[0] size[0] = env['DIA2PNGMAXWIDTH'] - return env.Action("$DIACOM -t png -s %dx%d -e $TARGET $SOURCE" % tuple(size)) + return SCons.Action.Action("$DIACOM -t png -s %dx%d -e $TARGET $SOURCE" % tuple(size)) Dia2Png = SCons.Builder.Builder(suffix = ".png", src_suffix = ".dia", diff --git a/senfscons/Doxygen.py b/senfscons/Doxygen.py index 8cd35dd..562d568 100644 --- a/senfscons/Doxygen.py +++ b/senfscons/Doxygen.py @@ -96,6 +96,7 @@ import os, sys, traceback import os.path import glob, re +import SCons.Action from fnmatch import fnmatch EnvVar = re.compile(r"\$\(([0-9A-Za-z_-]+)\)") @@ -295,8 +296,8 @@ def DoxyGenerator(source, target, env, for_signature): data = DoxyfileParse(env, source[0].abspath) - actions = [ env.Action("cd ${SOURCE.dir} && TOPDIR=%s ${DOXYGEN} ${SOURCE.file}" - % (relpath(source[0].dir.abspath, env.Dir('#').abspath),)) ] + actions = [ SCons.Action.Action("cd ${SOURCE.dir} && TOPDIR=%s ${DOXYGEN} ${SOURCE.file}" + % (relpath(source[0].dir.abspath, env.Dir('#').abspath),)) ] # This will add automatic 'installdox' calls. # @@ -335,9 +336,9 @@ def DoxyGenerator(source, target, env, for_signature): if args is not None and url: args.append("-l %s@%s" % ( os.path.basename(tagfile), url )) if args: - actions.append(env.Action('cd %s && ./installdox %s' % (output_dir, " ".join(args)))) + actions.append(SCons.Action.Action('cd %s && ./installdox %s' % (output_dir, " ".join(args)))) - actions.append(env.Action([ "touch $TARGETS" ])) + actions.append(SCons.Action.Action([ "touch $TARGETS" ])) return actions diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index 2691664..e365e85 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -23,7 +23,8 @@ # All other functions are for internal use only. import os.path, glob -import SCons.Options, SCons.Environment, SCons.Script.SConscript, SCons.Node.FS, SCons.Defaults +import SCons.Options, SCons.Environment, SCons.Script.SConscript, SCons.Node.FS +import SCons.Defaults, SCons.Action ## \defgroup use Predefined Framework Configurators # @@ -372,7 +373,7 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): # references env.AddPostAction( docs, - env.Action("xsltproc --nonet -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" + SCons.Action.Action("xsltproc --nonet -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" % { 'target': tagnode.abspath, 'template': os.path.join(basedir,"tagmunge.xsl") })) @@ -380,7 +381,7 @@ def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): xslfile = env.File(env['DOXY_HTML_XSL']) env.AddPostAction( docs, - env.Action(("for html in %s/*.html; do " + + SCons.Action.Action(("for html in %s/*.html; do " + " echo $$html;" + " sed -e 's/id=\"current\"/class=\"current\"/' $${html}" + " | tidy -ascii -q --show-warnings no --fix-uri no" +