ref: c2fd0c205a522af67c9dc2eb44ba009f739ab6b6
parent: afba590c6314fd15f2e7489123d1f9b74d7939a6
author: Alex Musolino <[email protected]>
date: Sun Nov 26 15:01:09 EST 2023
sdrip/rename.rc: exit 0 if no files to process
--- a/sdrip/rename.rc
+++ b/sdrip/rename.rc
@@ -1,11 +1,19 @@
-#!/bin/rc -e
+#!/bin/rc
+flag e +
+
. ./fns.rc
rename webp WEBP -- *.webp >[2]/dev/null || {}
rename jpg JPG -- *.jpg >[2]/dev/null || {}
rename png PNG -- *.png >[2]/dev/null || {}
-exiv2 -q --Force -t rename `{lscmd >[2]/dev/null} || true
+
+files=`{lscmd >[2]/dev/null}
+
+if(~ $#files 0)
+ exit 0
+
+exiv2 -q --Force -t rename $files || {}
sha1sum -- `{lscmd >[2]/dev/null} | awk '
function quote(s){