Update deploy-ebook-to-www so that it changes the modified date in teh deployed content.opf file, so that generate-opds can use it

This commit is contained in:
Alex Cabal 2020-03-01 17:20:59 -06:00
parent affc65bb9d
commit a8bef9ad93

View file

@ -178,6 +178,11 @@ do
printf "Done.\n" printf "Done.\n"
fi fi
# Get the last commit date so that we can update the modified timestamp in
# deployed content.opf. generate-opds uses this timestamp in its output.
modifiedDate=$(TZ=UTC git log --date=iso-strict-local -1 --pretty=tformat:"%cd" --abbrev-commit | sed "s/+00:00/Z/")
sed --in-place --regexp-extended "s/<meta property=\"dcterms:modified\">.+?<\/meta>/<meta property=\"dcterms:modified\">${modifiedDate}<\/meta>/" "${workDir}/src/epub/content.opf"
# Delete the contents of the old webdir # Delete the contents of the old webdir
rm --preserve-root --recursive --force "${webDir}" rm --preserve-root --recursive --force "${webDir}"