#!/usr/bin/perl # # release-patch - install a patch and email it to the mailing list # # Usage: release-patch filename # my $file = shift @ARGV; die "No filename given\n" unless $file; open(IN,$file) or die "Can't open that file\n"; my $info = info_header($file); while () { last if /^In this patch/; } while () { last if /^Prereq:/; $info .= $_; } close IN; system "install -m 644 $file /ftp/pub/PennMUSH/Source"; system "mv $file /home/dunemush/versions"; open(MAIL,"|-") || exec '/usr/sbin/sendmail -oi -t'; print MAIL < Subject: $file $info EOP close MAIL; exit 0; sub info_header { my $file = shift; return <