Add --no-feeds argument to deploy script

This commit is contained in:
Alex Cabal 2022-06-22 15:02:49 -05:00
parent f6df03cfca
commit ae79fc1f36

View file

@ -6,13 +6,13 @@ DESCRIPTION
Deploy a Standard Ebook source repository to the web.
USAGE
deploy-ebook-to-www [-v,--verbose] [-g,--group GROUP] [--webroot WEBROOT] [--weburl WEBURL] [--no-images] [--no-build] [--no-epubcheck] [--no-recompose] [-l,--last-push-hash HASH] DIRECTORY [DIRECTORY...]
deploy-ebook-to-www [-v,--verbose] [-g,--group GROUP] [--webroot WEBROOT] [--weburl WEBURL] [--no-images] [--no-build] [--no-epubcheck] [--no-recompose] [--no-feeds] [-l,--last-push-hash HASH] DIRECTORY [DIRECTORY...]
DIRECTORY is a bare source repository.
GROUP is a groupname. Defaults to "se".
WEBROOT is the path to your webroot. Defaults to "/standardebooks.org".
WEBURL is the URL the website is served on. Defaults to "https://standardebooks.org".
The deploy process does three things:
The deploy process does four things:
1. Build distributable ebook files using 'se build'.
@ -20,6 +20,8 @@ USAGE
3. Generate various images and thumbnails for web use.
4. Generates RSS/Atom/OPDS feeds.
With --no-images, do not create cover thumbnails or hero images for the web.
With --no-build, do not run 'se build' or 'se recompose' to create distributable ebook files or web-readable versions.
@ -30,6 +32,8 @@ USAGE
With --last-push-hash, check the repo head against HASH to see if the cover image or ebook source changed, which will determine if cover thumbnails get re-generated or the ebook gets re-built.
With --no-feeds, don't generate RSS/Atom/OPDS feeds.
EOF
exit
}
@ -46,6 +50,7 @@ webUrl="https://standardebooks.org"
lastPushHash=""
epubcheck="true"
recompose="true"
feeds="true"
if [ $# -eq 0 ]; then
usage
@ -95,6 +100,10 @@ while [ $# -gt 0 ]; do
build="false"
shift 1
;;
--no-feeds)
feeds="false"
shift 1
;;
*) break ;;
esac
done
@ -373,9 +382,10 @@ do
popd > /dev/null || die "Couldn't pop directory."
done
# Build the OPDS catalog
if [ "${feeds}" = "true" ]; then
# Build the various feeds catalog
if [ "${verbose}" = "true" ]; then
printf "Rebuilding OPDS catalog ... "
printf "Building feeds ... "
fi
"${scriptsDir}/generate-feeds" --webroot "${webRoot}" --weburl "${webUrl}"
@ -390,12 +400,4 @@ sudo chmod 775 "${webRoot}/www/opds/subjects"
if [ "${verbose}" = "true" ]; then
printf "Done.\n"
fi
# Build the new releases RSS feed
if [ "${verbose}" = "true" ]; then
printf "Rebuilding new releases RSS feed ... "
fi
if [ "${verbose}" = "true" ]; then
printf "Done.\n"
fi