ref: 38eb0dc068328a9764738109a42b8fd49d498b3e
parent: 94c8dca668de4f7517493b1af2d1054dc01a88cc
author: Alex Musolino <alex@musolino.id.au>
date: Sat Aug 19 18:19:14 EDT 2023
mkmontage.rc: run mkmontage func as subproc and do "exit 1" on failure
--- a/mkmontage.rc
+++ b/mkmontage.rc
@@ -3,7 +3,8 @@
fn mkmontage{
imgs=`{find -name '*.small.JPG' >[2]/dev/null | shuffle >[2]/dev/null | sed $2^q}
if(! ~ $#imgs $2){
- status='not enough images'
+ echo 'E: mkmontage: not enough images' >[1=2]
+ exit 1
}
if not{
n=`{echo 320/$1 | bc}
@@ -11,11 +12,11 @@
}
}
-if(! mkmontage 5 25
-&& ! mkmontage 4 16
-&& ! mkmontage 3 9
-&& ! mkmontage 2 4
-&& ! mkmontage 1 1){
+if(! @{mkmontage 5 25}
+&& ! @{mkmontage 4 16}
+&& ! @{mkmontage 3 9}
+&& ! @{mkmontage 2 4}
+&& ! @{mkmontage 1 1}){
echo 'E: failed to make montage for' `{pwd} >[1=2]
exit 1
}