mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
Update deploy-ebook-to-www to prevent it from destroying the new releases XML file if there's an error in an ebook
This commit is contained in:
parent
426ccb02fb
commit
ac812085db
1 changed files with 6 additions and 1 deletions
|
@ -400,7 +400,12 @@ if [ "${verbose}" = "true" ]; then
|
|||
printf "Rebuilding new releases RSS feed ... "
|
||||
fi
|
||||
|
||||
bash -c "php \"${scriptsDir}\"/generate-rss.php --webroot \"${webRoot}\" --weburl \"${webUrl}\" > \"${webRoot}\"/www/rss/new-releases.xml"
|
||||
output=$(php "${scriptsDir}/generate-rss.php" --webroot "${webRoot}" --weburl "${webUrl}")
|
||||
|
||||
# Check the return code; if the script failed (for example invalid XML in content.opf), don't overwrite the existing feed with a blank file
|
||||
if [ $? = 0 ]; then
|
||||
echo "${output}" > "${webRoot}/www/rss/new-releases.xml"
|
||||
fi
|
||||
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Done.\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue