From 5ec51e24c243459d90a02855815b6cf604c46f57 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 4 Jun 2015 17:21:37 +0000 Subject: [PATCH] catch up with trunk svn path=/branches/test/; revision=31331 --- build/arguments.sh | 5 +++++ build/buildrun.sh | 10 +++++++--- build/makerules.sh | 6 ++++-- build/stirrups.sh | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/build/arguments.sh b/build/arguments.sh index 353203bb74..33560764b4 100755 --- a/build/arguments.sh +++ b/build/arguments.sh @@ -17,6 +17,9 @@ if [ -z "$inc_arguments" ]; then --source) [ "$#" -gt 0 ] && shift 1 && basedir="$1" ;; + --stage|--stagedir) + [ "$#" -gt 0 ] && shift 1 && stagedir="$1" + ;; -d|--dest|--destination) [ "$#" -gt 0 ] && shift 1 && target="$1" ;; @@ -67,7 +70,9 @@ if [ -z "$inc_arguments" ]; then olang="${olang:-en}" tree="${tree:-$basedir}" + stagedir=${stagedir:-$target} readonly tree="${tree:+$(realpath "$tree")}" + readonly stagedir="${stagedir:+$(realpath "$stagedir")}" readonly basedir="${basedir:+$(realpath "$basedir")}" readonly target="${target:+$(realpath "$target")}" readonly domain="${domain:-www.fsfe.org}" diff --git a/build/buildrun.sh b/build/buildrun.sh index 1f7952edd0..fea97fbdb9 100755 --- a/build/buildrun.sh +++ b/build/buildrun.sh @@ -14,17 +14,21 @@ build_into(){ make -j $ncpu -C "$basedir" \ | logstatus premake - dir_maker "$basedir" "$target" + dir_maker "$basedir" "$stagedir" - tree_maker "$basedir" "$target" "$@" \ + tree_maker "$basedir" "$stagedir" "$@" \ | logstatus Makefile \ | build_manifest \ | logstatus manifest \ - | remove_orphans "$target" \ + | remove_orphans "$stagedir" \ | logstatus removed make -j $ncpu -f "$(logname Makefile)" all \ | logstatus buildlog + + [ "$stagedir" != "$target" ] && \ + rsync -av --del "$stagedir/" "$target/" \ + | logstatus stagesync } svn_build_into(){ diff --git a/build/makerules.sh b/build/makerules.sh index e58d37fac1..af5cf131f0 100755 --- a/build/makerules.sh +++ b/build/makerules.sh @@ -77,7 +77,8 @@ xhtml_maker(){ # account for included xml files and xsl rules shortname="$input/$1" - outpath="\${OUTPUTDIR}/${2#./}" + outpath="\${OUTPUTDIR}/${2}" + outpath="${outpath%/.}" textsen="$(get_textsfile "en")" menufile="$basedir/tools/menu-global.xml" @@ -165,7 +166,8 @@ xhtml_additions(){ copy_maker(){ # generate make rule for copying a plain file infile="\${INPUTDIR}/$1" - outpath="\${OUTPUTDIR}/${2#./}" + outpath="\${OUTPUTDIR}/${2}" + outpath="${outpath%/.}" outfile="$outpath/$(basename "$infile")" cat <