revert some accidentally pulled changes from my environment

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13848 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Igor Živković 2014-08-07 09:20:13 +00:00
parent c41b38ff6b
commit 6d3005f6b1
2 changed files with 50 additions and 5 deletions

View File

@ -1,15 +1,18 @@
# Makefile for BLFS Book generation.
# By Tushar Teredesai <tushar@linuxfromscratch.org>
# 2004-01-31
# $LastChangedBy$
# $Date$
# Adjust these to suit your installation
BASEDIR ?= $(HOME)/public_html/blfs-book-xsl
DUMPDIR ?= $(HOME)/blfs-commands
RENDERTMP ?= /tmp
RENDERTMP ?= tmp
CHUNK_QUIET = 1
ROOT_ID =
#PDF_OUTPUT = BLFS-BOOK.pdf
NOCHUNKS_OUTPUT = BLFS-BOOK.html
SHELL = /bin/sh
SHELL = /bin/bash
ALLXML := $(filter-out $(RENDERTMP)/%, \
$(wildcard *.xml */*.xml */*/*.xml */*/*/*.xml */*/*/*/*.xml))
@ -23,6 +26,7 @@ else
endif
blfs: html wget-list
#all: blfs nochunks pdf
all: blfs nochunks
world: all blfs-patch-list dump-commands test-links
@ -49,10 +53,31 @@ $(BASEDIR)/index.html: $(RENDERTMP)/blfs-html.xml
$(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
tidy -config tidy.conf $$filename; \
true; \
sh obfuscate.sh $$filename; \
bash obfuscate.sh $$filename; \
sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
done;
#pdf: $(BASEDIR)/$(PDF_OUTPUT)
#$(RENDERTMP)/blfs-pdf.xml: $(RENDERTMP)/blfs-full.xml
# @echo "Generating profiled XML for PDF..."
# $(Q)xsltproc --nonet --stringparam profile.condition pdf \
--output $(RENDERTMP)/blfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
$(RENDERTMP)/blfs-full.xml
#$(RENDERTMP)/blfs-pdf.fo: $(RENDERTMP)/blfs-pdf.xml
# @echo "Generating FO file..."
# $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
--output $(RENDERTMP)/blfs-pdf.fo stylesheets/blfs-pdf.xsl \
$(RENDERTMP)/blfs-pdf.xml
# $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/blfs-pdf.fo
#$(BASEDIR)/$(PDF_OUTPUT): $(RENDERTMP)/blfs-pdf.fo
# @echo "Generating PDF file..."
# $(Q)if [ ! -e $(BASEDIR) ]; then \
mkdir -p $(BASEDIR); \
fi;
# $(Q)fop $(RENDERTMP)/blfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT)
$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/blfs-html.xml
@echo "Generating non-chunked XHTML file..."
@ -74,6 +99,8 @@ $(RENDERTMP):
clean:
@echo "Cleaning $(RENDERTMP)"
$(Q)rm -f $(RENDERTMP)/blfs-{full,html}.xml
# $(Q)rm -f $(RENDERTMP)/blfs-{full,html,pdf}.xml
# $(Q)rm -f $(RENDERTMP)/blfs-pdf.fo
$(Q)rm -f $(RENDERTMP)/blfs-{patch-list,patches}
$(Q)rmdir $(RENDERTMP) 2>/dev/null || :
@ -133,6 +160,17 @@ $(BASEDIR)/test-links: $(RENDERTMP)/blfs-full.xml
fi; \
done
bootscripts:
@VERSION=`grep "bootscripts-version " general.ent | cut -d\" -f2`; \
BOOTSCRIPTS="blfs-bootscripts-$$VERSION"; \
if [ ! -e $$BOOTSCRIPTS.tar.xz ]; then \
rm -rf $(RENDERTMP)/$$BOOTSCRIPTS; \
mkdir $(RENDERTMP)/$$BOOTSCRIPTS; \
cp -a ../bootscripts/* $(RENDERTMP)/$$BOOTSCRIPTS; \
rm -rf ../bootscripts/archive; \
tar -cJhf $$BOOTSCRIPTS.tar.xz -C $(RENDERTMP) $$BOOTSCRIPTS; \
fi
dump-commands: $(DUMPDIR)
$(DUMPDIR): $(RENDERTMP)/blfs-full.xml
@echo "Dumping book commands..."
@ -145,4 +183,8 @@ validate:
$(Q)xmllint --noout --nonet --xinclude --postvalid index.xml
.PHONY: blfs all world html nochunks tmpdir clean validxml \
profile-html wget-list test-links dump-commands validate \
bootscripts
#.PHONY: blfs all world html pdf nochunks tmpdir clean validxml \
profile-html wget-list test-links dump-commands validate

View File

@ -1,4 +1,7 @@
#!/bin/sh
#!/bin/bash
# $LastChangedBy$
# $Date$
# obfuscate.sh
# obfuscate email addresses in XML/HTML
@ -30,7 +33,7 @@
for i in `grep -o '"mailto:.*@.*"' ${1} |cut -d\" -f2|sed -e 's|^mailto:||' -e 's|"$||'`; do
link=`echo $i | perl -pe 's/[^\n]/"\\\&#".ord($&)."\;"/ge'`
plaintext=`echo $i | sed -e 's|@| AT |' -e 's|\.| D0T |g'`
cp ${1} ${1}.tmp
cp ${1}{,.tmp}
sed -e "s|mailto:$i|mailto:$link|" \
-e "s|$i|$plaintext|" ${1}.tmp > ${1}
rm ${1}.tmp