#!/usr/bin/perl -w print "\nCreate new rules file from template:\n"; print "------------------------------------\n\n"; print "Name of new pach................: "; $patch = ; print "Patches wich packet.............: "; $packet = ; print "Filename of patch w/o version...: "; $name = ; print "Archive file suffix.............: "; $suffix = ; print "URL of download directory.......: "; $url = ; print "PTXdist Packet Author...........: "; $author = ; chop ($patch, $packet, $name, $suffix, $url, $author); $PATCH = uc($patch); $PACKET = uc($packet); open(INFILE, "template-patch") || die "Can't open template"; open(OUTFILE, ">$packet-$patch\.make") || die "Can't open new file"; while () { s,\@PATCH@,$PATCH,g; s,\@patch@,$patch,g; s,\@PACKET@,$PACKET,g; s,\@packet@,$packet,g; s,\@NAME@,$name,g; s,\@URL@,$url,g; s,\@AUTHOR@,$author,g; s,\@SUFFIX@,$suffix,g; print OUTFILE $_; } close(OUTFILE); close(INFILE); print "\n";