Alexandre Julliard : winedoc_release: Changed to run from cron instead of at release time.
Alexandre Julliard
julliard at winehq.org
Wed Jun 11 13:10:08 CDT 2008
Module: tools
Branch: master
Commit: f533b48cfd7590c2d59daa1c9ae10c2959f1a6cf
URL: http://source.winehq.org/git/tools.git/?a=commit;h=f533b48cfd7590c2d59daa1c9ae10c2959f1a6cf
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 11 19:58:26 2008 +0200
winedoc_release: Changed to run from cron instead of at release time.
Renamed to winedocs.cron.
---
winedoc_release | 83 -------------------------------------------------------
winedocs.cron | 64 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 83 deletions(-)
diff --git a/winedoc_release b/winedoc_release
deleted file mode 100755
index 63ae24f..0000000
--- a/winedoc_release
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-
-# This script is ran after a new release of Wine. It updates the website
-# and FTP for the new wine release.
-
-# usage: winedoc_release <winedoc version>
-
-set -e
-umask 002
-
-if [ $# -lt 1 ]
-then
- echo "Usage: $0 version|cvs"
- exit 1
-fi
-
-version=$1
-
-# nuke old attempt (if any)
-rm -rf wine-docs-$version
-
-if [ "$version" = "cvs" ]
-then
- cvs -z9 -d :pserver:anonymous at wine.cvs.sourceforge.net:/cvsroot/wine co -d wine-docs-cvs docs
-else
- if [ -f wine-docs-$version.tar.bz2 ]
- then
- echo "Already have Wine docs, skipping download"
- else
- ncftpget ftp://ibiblio.org/pub/linux/system/emulators/wine/wine-docs-$version.tar.bz2
- fi
- tar xfj wine-docs-$version.tar.bz2
- rm wine-docs-$version.tar.bz2
-fi
-
-echo "==== BUILDING SGML DOCUMENTATION ===="
-
-books="wineusr-guide winedev-guide winelib-guide"
-langs="en"
-site_base_dir="/home/winehq/opt/website"
-tools_dir="/home/winehq/opt/git-tools"
-guides_base_dir="$site_base_dir/docs"
-winehq_base_dir="$site_base_dir/templates"
-
-cd wine-docs-$version
-
-for lang in $langs
-do
- [ -d $guides_base_dir/$lang ] || mkdir $guides_base_dir/$lang
- [ -d $winehq_base_dir/$lang/docs ] || mkdir $winehq_base_dir/$lang/docs
- rm -f $guides_base_dir/$lang/winedoc.css && cp $tools_dir/winedoc.css $guides_base_dir/$lang
-
- cd $lang
- for book in $books
- do
- echo "* $book"
-
- # build guides as single files (only for releases)
- if [ "$version" != "cvs" ]
- then
- docbook2html -u -d $tools_dir/winehtml.dsl $book.sgml
- docbook2pdf -d $tools_dir/wineprint.dsl $book.sgml
- docbook2ps -d $tools_dir/wineprint.dsl $book.sgml
- mv -f $book.html $book.pdf $book.ps $guides_base_dir/$lang
- fi
-
- # build the online html version
- docbook2html -d $tools_dir/winehtml.dsl -o $book.web $book.sgml
- [ -d $winehq_base_dir/$lang/docs/$book ] || mkdir $winehq_base_dir/$lang/docs/$book
- for f in $book.web/*.htm
- do
- outfile=`basename $f .htm`.template
- $tools_dir/html2template -i $f -o $outfile && mv -f $outfile $winehq_base_dir/$lang/docs/$book/$outfile
- done
- rm -rf $book.web
- done
- cd ..
-done
-
-cd ..
-rm -rf wine-docs-$version
-
-# end
diff --git a/winedocs.cron b/winedocs.cron
new file mode 100755
index 0000000..472a087
--- /dev/null
+++ b/winedocs.cron
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# This script updates the documentation on the website if necessary.
+# It should be run periodically from cron.
+#
+
+set -e
+umask 002
+
+cd /home/winehq/opt/wine-docs
+git fetch >/dev/null 2>&1
+
+# check if anything has changed
+if [ "$(git rev-parse HEAD)" = "$(git rev-parse origin/master)" ]
+then
+ exit 0 # nothing to do
+fi
+
+rm -f lastbuild.log
+exec >lastbuild.log 2>&1
+
+git reset --hard origin/master
+
+echo "==== BUILDING SGML DOCUMENTATION ===="
+
+books="wineusr-guide winedev-guide winelib-guide"
+langs="en"
+site_base_dir="/home/winehq/opt/website"
+tools_dir="/home/winehq/opt/git-tools"
+git_dir="/home/winehq/opt/source/git"
+guides_base_dir="$site_base_dir/docs"
+winehq_base_dir="$site_base_dir/templates"
+
+for lang in $langs
+do
+ [ -d $guides_base_dir/$lang ] || mkdir $guides_base_dir/$lang
+ [ -d $winehq_base_dir/$lang/docs ] || mkdir $winehq_base_dir/$lang/docs
+ rm -f $guides_base_dir/$lang/winedoc.css && cp $tools_dir/winedoc.css $guides_base_dir/$lang
+
+ cd $lang
+ for book in $books
+ do
+ echo "* $book"
+
+ # build guides as single files
+ docbook2html -u -d $tools_dir/winehtml.dsl $book.sgml
+ docbook2pdf -d $tools_dir/wineprint.dsl $book.sgml
+ docbook2ps -d $tools_dir/wineprint.dsl $book.sgml
+ mv -f $book.html $book.pdf $book.ps $guides_base_dir/$lang
+
+ # build the online html version
+ docbook2html -d $tools_dir/winehtml.dsl -o $book.web $book.sgml
+ [ -d $winehq_base_dir/$lang/docs/$book ] || mkdir $winehq_base_dir/$lang/docs/$book
+ for f in $book.web/*.htm
+ do
+ outfile=`basename $f .htm`.template
+ $tools_dir/html2template -i $f -o $outfile && mv -f $outfile $winehq_base_dir/$lang/docs/$book/$outfile
+ done
+ rm -rf $book.web
+ done
+ cd ..
+done
+
+# end
More information about the wine-cvs
mailing list