From c3d0980ced399e284428d88927fdc8be525003cf Mon Sep 17 00:00:00 2001 From: The_Spider Date: Fri, 15 Apr 2022 08:50:28 -0500 Subject: [PATCH] fixes shell script's find command --- build-book-converter.jenkins | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-book-converter.jenkins b/build-book-converter.jenkins index 768700b..8f2a74c 100644 --- a/build-book-converter.jenkins +++ b/build-book-converter.jenkins @@ -52,8 +52,8 @@ IFS=\$'\\n' while true; do sleep 5s - if [ -z "\$(find /calibre/input -type f \\( -iname \\*.mobi -o -iname \\*.epub -o \\*.prc \\) -print -quit)" ]; then - for i in \$(find /calibre/input -type f \\( -iname \\*.mobi -o -iname \\*.epub -o \\*.prc \\)); do + if [ -z "\$(find /calibre/input -type f \\( -iname "*.mobi" -o -iname "*.epub" -o -iname "*.prc" \\) -print -quit)" ]; then + for i in \$(find /calibre/input -type f \\( -iname "*.mobi" -o -iname "*.epub" -o -iname "*.prc" \\)); do /opt/calibre/ebook-convert "\${i}" "/calibre/output/\${i%.*}.azw3" rm -f -v "\${i}" done