commit c92e170c3fe58744b69a623ca5cb14bb369ac76b parent 5f7e728f828d66710fc338f20b6aba2c3a006246 Author: St John Karp <contact@stjo.hn> Date: Fri, 10 Sep 2021 16:12:48 -0400 Revert "Remove the hacks to wait for child jobs to complete" This reverts commit 0d675aa3ca8b9f260642dcad87a12f3d6dedd277. Diffstat:
M | squeeze.sh | | | 6 | ++++++ |
M | unsqueeze.sh | | | 6 | ++++++ |
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/squeeze.sh b/squeeze.sh @@ -102,6 +102,12 @@ find "$source_path" -type f -name "*.md" $find_test | # Wait until all jobs have completed. wait +# The `wait` command doesn't seem to wait for all the running jobs. +# Maybe it's stopping after all `swipl` processes complete? +# This hack just checks to see if any sed or smartypants processes are running. +while [ $(ps -A | grep -c -e " sed$" -e " smartypants$") -gt 0 ]; do + sleep 1 +done # Generate the RSS feed. mkdir -p "${feed_path%/*}" diff --git a/unsqueeze.sh b/unsqueeze.sh @@ -42,3 +42,9 @@ find "$output_path" -type f -name "*.html" | # Wait until all jobs have completed. wait +# The `wait` command doesn't seem to wait for all the running jobs. +# Maybe it's stopping after all `swipl` processes complete? +# This hack just checks to see if any sed processes are running. +while [ $(ps -A | grep -c " sed$") -gt 0 ]; do + sleep 1 +done