Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add -o option too.

  • Loading branch information...
commit 817476fab78e85202f8c15c9aabcbfb36a10fead 1 parent 682426b
@colomon authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 bin/abc2ly
View
13 bin/abc2ly
@@ -435,12 +435,17 @@ multi sub MAIN() {
TuneStreamToLilypondStream($*IN, $*OUT);
}
-multi sub MAIN($first-abc-file, *@other-abc-files, :x($index)?) {
+multi sub MAIN($first-abc-file, *@other-abc-files, :x($index)?, :$o?) {
my @abc-files = $first-abc-file, @other-abc-files;
for @abc-files -> $abc-file {
- my $ly-file = $abc-file ~ ".ly";
- if $abc-file ~~ /^(.*) ".abc"/ {
- $ly-file = $0 ~ ".ly";
+ my $ly-file;
+ if $o {
+ $ly-file = $o;
+ } else {
+ $ly-file = $abc-file ~ ".ly";
+ if $abc-file ~~ /^(.*) ".abc"/ {
+ $ly-file = $0 ~ ".ly";
+ }
}
$*ERR.say: "Reading $abc-file, writing $ly-file";

0 comments on commit 817476f

Please sign in to comment.
Something went wrong with that request. Please try again.