From 459571b5404a2b79c42491462bc462d0ace5ec37 Mon Sep 17 00:00:00 2001 From: The_Spider Date: Fri, 15 Apr 2022 08:38:27 -0500 Subject: [PATCH] escabes dollar signs --- build-book-converter.jenkins | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build-book-converter.jenkins b/build-book-converter.jenkins index e006096..768700b 100644 --- a/build-book-converter.jenkins +++ b/build-book-converter.jenkins @@ -48,14 +48,14 @@ ENTRYPOINT ["/bin/bash", "-c", "/calibre/entrypoint.sh"] """ dockerScript = """#!/usr/bin/env bash -IFS=$'\\n' +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 - /opt/calibre/ebook-convert "${i}" "/calibre/output/${i%.*}.azw3" - rm -f -v "${i}" + 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 + /opt/calibre/ebook-convert "\${i}" "/calibre/output/\${i%.*}.azw3" + rm -f -v "\${i}" done fi done