diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
commit | a6f3675fc4e21b3f899286b9a02005368d913f74 (patch) | |
tree | c9bfa92b223783ff03b8e941c3bb0d36c68d3b5e /misc/ext.d/image.sh | |
parent | Releasing progress-linux version 3:4.8.30-1~progress7.99u1. (diff) | |
download | mc-a6f3675fc4e21b3f899286b9a02005368d913f74.tar.xz mc-a6f3675fc4e21b3f899286b9a02005368d913f74.zip |
Merging upstream version 3:4.8.31.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'misc/ext.d/image.sh')
-rwxr-xr-x | misc/ext.d/image.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/misc/ext.d/image.sh b/misc/ext.d/image.sh index 04307e0..c191225 100755 --- a/misc/ext.d/image.sh +++ b/misc/ext.d/image.sh @@ -12,14 +12,19 @@ do_view_action() { filetype=$1 case "${filetype}" in - jpeg) - identify "${MC_EXT_FILENAME}" - which exif >/dev/null 2>&1 && exif "${MC_EXT_FILENAME}" 2>/dev/null - ;; xpm) - sxpm "${MC_EXT_FILENAME}" + [ -n "$DISPLAY" ] && sxpm "${MC_EXT_FILENAME}" ;; *) + if which exif >/dev/null 2>&1; then + exif "${MC_EXT_FILENAME}" 2>/dev/null + E=$? + else + E=1 + fi + if [ $E != 0 ] && which exiftool >/dev/null 2>&1; then + exiftool "${MC_EXT_FILENAME}" 2>/dev/null + fi identify "${MC_EXT_FILENAME}" ;; esac |