From: Scott Worley Date: Fri, 28 Feb 2014 16:56:20 +0000 (-0800) Subject: Resumability: Skip processing if output exists X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/fd69f56988c764cf5b190f130ecbe365de64b8ca Resumability: Skip processing if output exists --- 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