for my $src (@ARGV) {
my ($name, @cmds) = split /:(?<!\\:)/, $src =~ s/\.(\w+)\z//r;
my $ext = $1 // '*';
+ print $name;
next if $name =~ m/\./;
unless (-e $src) {
($src) = grep {-e} glob qq<"$name"{,:*}.$ext> or next;
}
s/\\(.)/$1/g for @cmds;
- say $name;
+ print ':';
if (@cmds and $cmds[0] =~ /^\d/) {
# crop shorthand from initial dimension argument
my $image = Shiar_Sheet::ImagePrep->new($src);
for (@ffs) {
my ($ff, @ffcmds) = @{$_};
+ print " $ff";
$image->convert("../$name.$ff", [@cmds, @ffcmds]);
}
1;
} or do {
- warn "error creating image:\n";
+ say ' FAILED';
warn ref $@ eq 'ARRAY' ? $@->[1] : $@ if $@;
$failcount++;
};
}
+continue {
+ say '';
+}
exit $failcount;