diff options
author | ohauer <ohauer@FreeBSD.org> | 2012-09-24 01:12:59 +0800 |
---|---|---|
committer | ohauer <ohauer@FreeBSD.org> | 2012-09-24 01:12:59 +0800 |
commit | bbc7f5af5190c6e185e87c307cc98e6f2dd83766 (patch) | |
tree | 945a60a188c2b90e7b5bf067da0e3f9d53fc8003 /Tools | |
parent | 66cc5e52b69ba6b9daff443223ecf5a11931cd88 (diff) | |
download | freebsd-ports-gnome-bbc7f5af5190c6e185e87c307cc98e6f2dd83766.tar.gz freebsd-ports-gnome-bbc7f5af5190c6e185e87c307cc98e6f2dd83766.tar.zst freebsd-ports-gnome-bbc7f5af5190c6e185e87c307cc98e6f2dd83766.zip |
- prefix saved files (PR/patches) with PR_$num
PR: ports/171853
Submitted by: ohauer
Approved by: miwi (maintainer) explicit per PM
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/getpr | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Tools/scripts/getpr b/Tools/scripts/getpr index 7b0eabf1b119..e612ee32f3ef 100755 --- a/Tools/scripts/getpr +++ b/Tools/scripts/getpr @@ -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(<PATCH>) { if (m/^# This is a shell archive. Save it in a file, remove anything before/) { &shar; @@ -70,7 +73,7 @@ while(<PATCH>) { } 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"; } |