From owner-svn-ports-head@FreeBSD.ORG Sun Sep 23 17:13:00 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D8A2106564A; Sun, 23 Sep 2012 17:13:00 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 197A28FC0A; Sun, 23 Sep 2012 17:13:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8NHCxLM041240; Sun, 23 Sep 2012 17:12:59 GMT (envelope-from ohauer@svn.freebsd.org) Received: (from ohauer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8NHCxWF041238; Sun, 23 Sep 2012 17:12:59 GMT (envelope-from ohauer@svn.freebsd.org) Message-Id: <201209231712.q8NHCxWF041238@svn.freebsd.org> From: Olli Hauer Date: Sun, 23 Sep 2012 17:12:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r304753 - head/Tools/scripts X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 17:13:00 -0000 Author: ohauer Date: Sun Sep 23 17:12:59 2012 New Revision: 304753 URL: http://svn.freebsd.org/changeset/ports/304753 Log: - prefix saved files (PR/patches) with PR_$num PR: ports/171853 Submitted by: ohauer Approved by: miwi (maintainer) explicit per PM Modified: head/Tools/scripts/getpr Modified: head/Tools/scripts/getpr ============================================================================== --- head/Tools/scripts/getpr Sun Sep 23 17:09:22 2012 (r304752) +++ head/Tools/scripts/getpr Sun Sep 23 17:12:59 2012 (r304753) @@ -26,10 +26,13 @@ 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") or die "$pr: $!"; -open(PATCH, "> pr-patch") or die "pr-patch: $!"; +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 = ""; @@ -56,7 +59,7 @@ close(PATCH); # .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"); +open(PATCH, $pr_patch); while() { if (m/^# This is a shell archive. Save it in a file, remove anything before/) { &shar; @@ -70,7 +73,7 @@ while() { } close(PATCH); -system("more pr-patch"); +system("more $pr_patch"); exit; @@ -80,7 +83,7 @@ sub uudecode { $fname =~ s/\s+$//g; print "$fname\n"; - print `uudecode pr-patch`; + 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$/) { @@ -89,5 +92,5 @@ sub uudecode { } sub shar { - print "you may extract this shar archive by typing sh pr-patch\n"; + print "you may extract this shar archive by typing sh $pr_patch\n"; }