From a8bef9ad934f3cb8c18411cfb99e1a963e505dab Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sun, 1 Mar 2020 17:20:59 -0600 Subject: [PATCH] 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 --- scripts/deploy-ebook-to-www | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/deploy-ebook-to-www b/scripts/deploy-ebook-to-www index 0f319668..4911835f 100755 --- a/scripts/deploy-ebook-to-www +++ b/scripts/deploy-ebook-to-www @@ -178,6 +178,11 @@ do printf "Done.\n" 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>/${modifiedDate}<\/meta>/" "${workDir}/src/epub/content.opf" + # Delete the contents of the old webdir rm --preserve-root --recursive --force "${webDir}"