Find files regardless of given :* suffixes, so commands can be executed
without having to rename.
my $failcount = 0;
for my $src (@ARGV) {
- my ($name, @cmds) = split /:/, $src =~ s/\.\w+$//r;
+ my ($name, @cmds) = split /:/, $src =~ s/\.(\w+)\z//r;
+ my $ext = $1 // '*';
next if $name =~ m/\./;
+ unless (-e $src) {
+ ($src) = grep {-e} glob qq<"$name"{,:*}.$ext> or next;
+ }
say $name;
unshift @cmds, -gravity => 'northwest';
push @cmds, -resize => '300x200^', -gravity => 'north', -extent => '300x200';