catch up with trunk

svn path=/branches/test/; revision=31331
This commit is contained in:
2015-06-04 17:21:37 +00:00
parent 28dd400865
commit 5ec51e24c2
4 changed files with 18 additions and 7 deletions

View File

@@ -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}"

View File

@@ -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(){

View File

@@ -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 <<MakeEND

View File

@@ -42,10 +42,10 @@ remove_orphans(){
# We use 'uniq -u' to drop those from the list.
# Remaining single files exist only in the tree and are to be removed
(find "$dtree" -type f -o -type l; sed "s;^.*$;$dtree/&;") \
(find "$dtree" \( -type f -o -type l \) -printf '%P\n' ; cat) \
| sort \
| uniq -u \
| while read file; do
match "$file" "^$dtree" && rm -v "$file"
rm -v "$dtree/$file"
done
}