From: fred Date: Sun, 3 Aug 1997 15:32:36 +0000 (+0000) Subject: lilypond-0.1.1 X-Git-Tag: release/1.5.59~6096 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d1591c7adf44410caf154da3635465b119444b86;p=lilypond.git lilypond-0.1.1 --- diff --git a/bin/show-latest.in b/bin/show-latest.in index e87a6ad630..a75250b54f 100644 --- a/bin/show-latest.in +++ b/bin/show-latest.in @@ -1,28 +1,30 @@ #!@PERL@ +# -*-Perl-*- -$reldir="~/musix/releases"; +$reldir="/home/hw/musix/releases"; use FileHandle; +use Getopt::Long; -sub cmpver +sub cmpver { - - my(@a)= split /\./,$a; - my(@b)= split /\./,$b; - - for $i (0,1,2) { - return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]); - } - return $a cmp $b; + my(@a)= split( /\./, $a); + my(@b)= split( /\./, $b); + + for $i (0,1,2) { + return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]); + } + return $a cmp $b; } my @versions; open LS, "ls -1 $reldir|"; +GetOptions( 'print', 'news', 'latest'); + while () { - $_ =~ /lilypond-([^.]+\.[^.]+\.[^.]+).tar.gz/; push @versions, $1; } @@ -32,12 +34,20 @@ while () { my $last= (pop @versions); -system "rm $reldir/zZ*"; -system "> $reldir/zZ_LATEST_IS_$last"; +if ( $opt_print ) { + print $last; +} + +if ( $opt_latest) { + system "rm $reldir/zZ*"; + system "> $reldir/zZ_LATEST_IS_$last"; +} +if ( $opt_news ) { + open NEWS, "tar --to-stdout -zxf $reldir/lilypond-$last.tar.gz lilypond-$last/NEWS |"; + input_record_separator NEWS "****"; + $desc = ; + chop ($desc); + close NEWS; -open NEWS, "tar --to-stdout -zxf $reldir/lilypond-$last.tar.gz lilypond-$last/NEWS |"; -input_record_separator NEWS "****"; -$desc = ; -chop ($desc); -close NEWS; print $desc; +}