aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorAlex Kozlov <ak@FreeBSD.org>2014-11-24 18:50:04 +0000
committerAlex Kozlov <ak@FreeBSD.org>2014-11-24 18:50:04 +0000
commitb905046ff4dceb0aee8b23835cfb51713b611459 (patch)
treecef666932d193fdc72e460087e9ea200dd1ffb4e /Tools
parent9baf6a6bd1cc722bdf47a026731c679cf69e4d90 (diff)
downloadports-b905046ff4dceb0aee8b23835cfb51713b611459.tar.gz
ports-b905046ff4dceb0aee8b23835cfb51713b611459.zip
- Doesn't support Bugzilla bugtracker
Notes
Notes: svn path=/head/; revision=373347
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/getpr96
1 files changed, 0 insertions, 96 deletions
diff --git a/Tools/scripts/getpr b/Tools/scripts/getpr
deleted file mode 100755
index 8b21b650d138..000000000000
--- a/Tools/scripts/getpr
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/env perl
-#
-# MAINTAINER= ports@FreeBSD.org
-#
-# $FreeBSD$
-#
-
-use strict;
-
-my $pr = shift;
-my $user = shift;
-my $ssh;
-
-if ($pr eq "") {
- print STDERR "getpr prnum [username]\n";
- exit 1
-}
-
-if( !defined $ENV{"CVS_RSH"} ) {
- $ssh = "ssh";
-} else {
- $ssh = $ENV{"CVS_RSH"};
-}
-
-if ($user ne "") {
- $user = "$user@";
-}
-
-my $pr_num = "PR_" . $pr;
-my $pr_patch = "PR_" . $pr . ".patch";
-
-# get the PR off of freefall
-
-open(D, "> $pr_num") or die "$pr_num: $!";
-open(PATCH, "> $pr_patch") or die "$pr_patch: $!";
-open(PR, " ${ssh} ${user}freefall.freebsd.org query-pr -F $pr | ") or die $!;
-
-my $fix = "";
-my $infix = 0;
-
-while(<PR>) {
- print D;
-
- if (m/^>Release-Note:/) {
- $infix = 0;
- }
- if ($infix == 1) {
- print PATCH;
- }
- if (m/^>Fix:/) {
- $infix = 1;
- }
-}
-close(D);
-close(PR);
-close(PATCH);
-
-# decode the submission attempting to find a file attachment by extension
-# .tar.gz, .shar or just .gz, if not found, display what we think of as
-# the file submission (probably just a patch)
-
-open(PATCH, $pr_patch);
-while(<PATCH>) {
- if (m/^# This is a shell archive. Save it in a file, remove anything before/) {
- &shar;
- exit;
- }
- if (m/^begin (\d+)? (.*)/) {
- &uudecode($2);
- close(PATCH);
- exit;
- }
-}
-
-close(PATCH);
-system("more $pr_patch");
-
-exit;
-
-sub uudecode {
- my ($fname) = @_;
-
- $fname =~ s/\s+$//g;
- print "$fname\n";
-
- print `uudecode $pr_patch`;
- if (($fname =~ m/.tar.gz$/) || ($fname =~ m/.tgz$/)) {
- print "you may extract this tarball by typing tar xvzf $fname\n";
- } elsif ($fname =~ m/.gz$/) {
- print `gunzip $fname`;
- }
-}
-
-sub shar {
- print "you may extract this shar archive by typing sh $pr_patch\n";
-}