From fd69f56988c764cf5b190f130ecbe365de64b8ca Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 28 Feb 2014 08:56:20 -0800 Subject: [PATCH] Resumability: Skip processing if output exists --- pics-preprocess | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pics-preprocess b/pics-preprocess index 87eca8c..fde35d1 100755 --- a/pics-preprocess +++ b/pics-preprocess @@ -15,13 +15,17 @@ for f;do base="$(basename "$f")" out="$level/${base%.NEF}.jpeg" exposure=$(dc <<< "2k $level 4 / 3.5-p") # 10 to 30 -> -1 to 4 in .25 steps - ufraw-batch --out-type=jpeg \ - --green="$GREEN" \ - --temperature="$TEMPERATURE" \ - --compression="$JPEGCOMPRESSION" \ - --exposure="$exposure" \ - --output="$out" \ - "$f" - convert "$out" -geometry "x$SMALLHEIGHT" "sm/$out" + if [[ ! -s "$out" ]];then + ufraw-batch --out-type=jpeg \ + --green="$GREEN" \ + --temperature="$TEMPERATURE" \ + --compression="$JPEGCOMPRESSION" \ + --exposure="$exposure" \ + --output="$out" \ + "$f" + fi + if [[ ! -s "sm/$out" ]];then + convert "$out" -geometry "x$SMALLHEIGHT" "sm/$out" + fi done done -- 2.44.1