From f14b751b1cfba0df058dcc3b5b075ce7aa05e36b Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 5 Aug 1997 15:25:12 +0000 Subject: [PATCH] lilypond-0.1.7 --- bin/mudela-book.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/mudela-book.in b/bin/mudela-book.in index 11f27a40aa..374f223a1f 100644 --- a/bin/mudela-book.in +++ b/bin/mudela-book.in @@ -3,6 +3,7 @@ my $mudcount = 0; my $mudela_b = 0; my $outname = "-"; +my $outdir; use Getopt::Long; sub gen_mufile @@ -99,7 +100,7 @@ sub main if (defined ($opt_outdir)) { $outdir = $opt_outdir . "/"; } else { - $outdir = ""; + $outdir = "."; } if (defined ($ARGV[0])) { @@ -110,12 +111,17 @@ sub main if (defined ($opt_outname)) { $outname = $opt_outname ; } else { - die "Need to have an output name, use --outname" if ( $infile == "-"); + die "Need to have an output name, use --outname" if ( $infile eq "-"); $outname = "$infile.tex"; } - + + my $openout ="$outdir$outname"; + if ( $infile eq $openout ) { + die "The input can't be the output\n"; + } + open INFILE, "<$infile"; - open BOOK, ">$outdir$outname"; + open BOOK, ">$openout"; while () { if ($mudela_b) { if (end_b "mudela") { -- 2.39.5