]> git.donarmstrong.com Git - bin.git/blobdiff - sgf_rename
add mutt alias which executes neomutt if that exists
[bin.git] / sgf_rename
index 759380ce65da4bd4e27100dca6e6fd9927d45ef1..b6c9ff57e4baa50e8e6a3d3ad4a48e292ebd3f96 100755 (executable)
@@ -39,4 +39,11 @@ for my $sgf (@ARGV) {
      next if $sgf eq $new_file;
      warn "$new_file already exists" and next if -e $new_file;
      rename($sgf,$new_file);
+     my $psgz = $sgf;
+     $psgz =~ s/\.sgf/.ps.gz/;
+     if (-e $psgz) {
+         my $new_psgz = $new_file;
+         $new_psgz =~ s/\.sgf/.ps.gz/;
+         rename($psgz,$new_psgz);
+     }
 }