From b1c863ed934435502ae79d2716ccbb93b5e133fe Mon Sep 17 00:00:00 2001 From: Danny Bautista Date: Wed, 5 Jun 2019 13:25:33 -0400 Subject: [PATCH] Fix directory entry and exit in deploy-ebook-to-www. --- scripts/deploy-ebook-to-www | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/deploy-ebook-to-www b/scripts/deploy-ebook-to-www index 46d8c91e..cdf63c3e 100755 --- a/scripts/deploy-ebook-to-www +++ b/scripts/deploy-ebook-to-www @@ -54,7 +54,10 @@ do die "Invalid repo root: ${repoDir}" fi - cd "${repoDir}" || return + if ! pushd "${repoDir}" > /dev/null; then + echo "Couldn't cd into ${repoDir}. Skipping." + continue + fi if [ "${verbose}" = "true" ]; then printf "Entering %s\n" "${repoDir}" @@ -155,6 +158,8 @@ do if [ "${verbose}" = "true" ]; then printf "Done.\n" fi + + popd > /dev/null || die "Couldn't pop directory." done # Build the OPDS catalog