diff options
author | toonn <toonn@toonn.io> | 2019-06-18 14:30:53 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2019-06-18 14:44:36 +0200 |
commit | 85445558bd57ffcadc05ca5b89ec76ec69a384bc (patch) | |
tree | 138fd48b3286e0eb55c9b3f1337ad553c3fde91a | |
parent | 5f29f89a03aa3d3f9e47e87f68d66e416f084556 (diff) | |
download | ranger-85445558bd57ffcadc05ca5b89ec76ec69a384bc.tar.gz |
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.
-rwxr-xr-x | ranger/data/scope.sh | 20 |
1 files 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 <https://github.com/marianosimone/epub-thumbnailer>) - # 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;; |