Win32 build - build docs either from git (default) or svn

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22474 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2012-10-31 12:14:39 +00:00
parent d9fb4d3511
commit 46334ab2fb
3 changed files with 38 additions and 12 deletions

View File

@ -18,8 +18,6 @@ function qpushd() { pushd "$@" >/dev/null; }
function qpopd() { popd >/dev/null; }
function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
TAG_URL=http://svn.gnucash.org/repo/gnucash/tags
################################################################
# Setup our environment (we need the DOWNLOAD_DIR)

View File

@ -408,9 +408,15 @@ set_default CMAKE_DIR $GLOBAL_DIR\\cmake
set_default DOCBOOK_XSL_URL "$SF_MIRROR/docbook/docbook-xsl-1.76.1.zip"
set_default DOCBOOK_DTD_URL "http://www.oasis-open.org/docbook/xml/4.1.2/docbkx412.zip"
if [ "$REPOS_TYPE" = "git" ]; then
set_default DOCS_REV "trunk"
set_default DOCS_URL "git://github.com/Gnucash/gnucash-docs.git"
elif [ "$REPOS_TYPE" = "svn" ]; then
# latest revision that should compile, use HEAD or vwxyz
set_default DOCS_REV "HEAD"
set_default DOCS_URL "http://svn.gnucash.org/repo/gnucash-docs/trunk"
fi
set_default UPDATE_DOCS yes
set_default DOCS_REV "HEAD"
set_default DOCS_URL "http://svn.gnucash.org/repo/gnucash-docs/trunk"
set_default DOCS_DIR $GLOBAL_DIR\\gnucash-docs
set_default XSLTPROCFLAGS ""

View File

@ -1578,6 +1578,32 @@ EOF
fi
}
function checkupd_docs_svn() {
if [ "$UPDATE_DOCS" = "yes" ]; then
if [ -x .svn ]; then
setup "Docs - Update repository (svn)"
svn up -r $DOCS_REV
else
setup "Docs - Checkout repository (svn)"
svn co -r $DOCS_REV $DOCS_URL .
fi
fi
}
function checkupd_docs_git() {
if [ "$UPDATE_DOCS" = "yes" ]; then
if [ -x .git ]; then
setup "Docs - Update repository (git)"
$GIT_CMD pull
else
setup "Docs - Checkout repository (git)"
$GIT_CMD clone $DOCS_URL .
$GIT_CMD checkout $DOCS_REV
fi
fi
}
function make_chm() {
_CHM_TYPE=$1
_CHM_LANG=$2
@ -1628,14 +1654,10 @@ function inst_docs() {
mkdir -p $_DOCS_UDIR/repos
qpushd $_DOCS_UDIR/repos
if [ "$UPDATE_DOCS" = "yes" ]; then
if [ -x .svn ]; then
setup "SVN update of docs"
svn up -r ${DOCS_REV}
else
setup "SVN checkout of docs"
svn co -r ${DOCS_REV} $DOCS_URL .
fi
if [ "$REPOS_TYPE" = "svn" ]; then
checkupd_docs_svn
else
checkupd_docs_git
fi
setup docs
_DOCS_INST_UDIR=`unix_path $INSTALL_DIR`/share/gnucash/help