Parcourir la source

postprocess: allow using dcraw_emu from Debian

As `dcraw_emu` is an example program, Debian doesn't install it to
`/usr/bin`, but to `/usr/lib/libraw` instead, meaning it can't be found
the usual way.

This patch checks for `/usr/lib/libraw/dcraw_emu` if `command` can't
find it. Additionnally, cascaded if's are replaced with if..elif
statements, so we stop searching as soon as a matching program
(preferably `dcraw_emu`) is found.
Arnaud Ferraris il y a 4 ans
Parent
commit
7f8b6520c6
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      postprocess.sh

+ 5 - 2
postprocess.sh

@@ -40,8 +40,11 @@ then
 	DCRAW=dcraw_emu
 	# -fbdd 1	Raw denoising with FBDD
 	set -- -fbdd 1
-fi
-if command -v "dcraw" > /dev/null
+elif [ -x "/usr/lib/libraw/dcraw_emu" ]; then
+	DCRAW=/usr/lib/libraw/dcraw_emu
+	# -fbdd 1	Raw denoising with FBDD
+	set -- -fbdd 1
+elif command -v "dcraw" > /dev/null
 then
 	DCRAW=dcraw
 	TIFF_EXT="tiff"