From 9b7934e51dbc04e6908f05b223e5b775ae0a2de2 Mon Sep 17 00:00:00 2001 From: defanor Date: Sun, 10 Sep 2023 17:09:59 +0300 Subject: Use make for building Still generating a dump out of all the files in order to build indexes afterwards, but this change will help to avoid unnecessary modification and reupload of notes that were not modified. --- tools/publish.sh | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'tools/publish.sh') diff --git a/tools/publish.sh b/tools/publish.sh index 90ed8e2..987cf00 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -1,39 +1,6 @@ #!/bin/sh -BASEDIR=~/homepage -TOOLS="${BASEDIR}/tools" -BUILD="${BASEDIR}/build" -ATOM="${BASEDIR}/notes/atom.xml" -SOURCES="${BASEDIR}/src" -NOTES="${SOURCES}/notes" - - -# dump all the notes into a single file -(echo '' && - echo '' && - find "${NOTES}" -name '*.xhtml' | - grep -v index.xhtml | - sed -e "sS^${SOURCES}/\(.*\)S S" && - echo '') | - xsltproc -o "${BUILD}/notes-dump.xml" "${TOOLS}/xml-notes-dump.xsl" - - -# sort by publication and modification dates -xsltproc -o "${BUILD}/notes-by-publication-date.xml" \ - "${TOOLS}/xml-notes-sort.xsl" "${BUILD}/notes-dump.xml" -xsltproc -o "${BUILD}/notes-by-modification-date.xml" \ - --stringparam sortBy modified \ - "${TOOLS}/xml-notes-sort.xsl" "${BUILD}/notes-dump.xml" - -# create an atom feed with the most recently modified 10 entries -xsltproc --param number 10 "${TOOLS}/xml-notes-limit.xsl" \ - "${BUILD}/notes-by-modification-date.xml" | - xsltproc -o "${ATOM}" "${TOOLS}/xml-notes-to-atom.xsl" - - -# convert sources into XHTML -find "${SOURCES}" -name '*.xhtml' | - sed -e "sS^${SOURCES}SS" | - xargs -Ifile xsltproc -o "${BASEDIR}/file" \ - "${TOOLS}/xml-to-html.xsl" "${SOURCES}file" +make -f tools/Makefile # upload rsync --exclude '.*' --exclude '*.org' --exclude 'src/' \ -- cgit v1.2.3