From 85445558bd57ffcadc05ca5b89ec76ec69a384bc Mon Sep 17 00:00:00 2001 From: toonn Date: Tue, 18 Jun 2019 14:30:53 +0200 Subject: Fix shellcheck warnings for new additions Rewrote the epub clauses to avoid overlap warnings `SC2221/SC2222`, users could've potentially been confused if they uncommented both Calibre and epub-thumbnailer clauses and didn't see epub-thumbnailer previews. --- ranger/data/scope.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index e211b50b..306eeed0 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -148,16 +148,16 @@ handle_image() { # -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ # && exit 6 || exit 1;; - ## ePub, MOBI, FB2 (using Calibre) - # application/epub+zip|application/x-mobipocket-ebook|application/x-fictionbook+xml) - # ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" > /dev/null \ - # && exit 6 || exit 1;; - ## ePub (using ) - # application/epub+zip) - # epub-thumbnailer \ - # "${FILE_PATH}" "${IMAGE_CACHE_PATH}" "${DEFAULT_SIZE%x*}" \ - # && exit 6 || exit 1;; + ## ePub, MOBI, FB2 (using Calibre) + # application/epub+zip|application/x-mobipocket-ebook|\ + # application/x-fictionbook+xml) + # # ePub (using https://github.com/marianosimone/epub-thumbnailer) + # epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \ + # "${DEFAULT_SIZE%x*}" && exit 6 + # ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \ + # >/dev/null && exit 6 + # exit 1;; ## Font application/font*|application/*opentype) @@ -245,7 +245,7 @@ handle_mime() { ## DjVu image/vnd.djvu) ## Preview as text conversion (requires djvulibre) - djvutxt "${FILE_PATH}" | fmt -w ${PV_WIDTH} && exit 5 + djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5 exiftool "${FILE_PATH}" && exit 5 exit 1;; -- cgit 1.4.1-2-gfad0 ='grep'>log msg