From: David Huggins-Daines <dhd@linuxcare.com>
To: Alan Modra <alan@linuxcare.com.au>
Cc: Matthew Wilcox <matthew@wil.cx>,
parisc-linux@thepuffingroup.com, parisc@lists.linuxcare.com
Subject: Re: Incompatibility of PIC and non-PIC
Date: 21 Aug 2000 09:41:18 -0400 [thread overview]
Message-ID: <877l9azq81.fsf@linuxcare.com> (raw)
In-Reply-To: Alan Modra's message of "Sun, 20 Aug 2000 14:19:05 +1000 (EST)"
Alan Modra <alan@linuxcare.com.au> writes:
> I haven't found one, and it's a real pain. I tend to edit patches
> covering multiple directories before passing them to patch.
>
> "sed -e '/^[+-][+-]/d' < cvs_diff_file | patch -p0 --posix" ought to work.
Here's a tiny Perl script I wrote for this purpose once in a fit of
pique. Use the -i option to specify the 'input' directory prefix
(i.e. in the --- line) and -o to specify the 'output' directory
prefix.
#!/usr/bin/perl -p
use strict;
use File::Basename;
use vars qw($in $out $path $name $dir);
BEGIN {
my @args;
while (defined($_ = shift)) {
if (/-i/) {
$in = shift;
$in =~ s,$,/,;
$in =~ tr,/,,s;
} elsif (/-o/) {
$out = shift;
$out =~ s,$,/,;
$out =~ tr,/,,s;
} else {
push @args, $_;
}
}
$out ||= $in;
$in ||= $out;
@ARGV=@args;
}
/^Index: (.*)/ and do {
($name, $dir) = fileparse($1);
};
/^(---|\+\+\+) ([^\t]+)/ and do {
die "Your CVS isn't broken, $2 doesn't match $name\n" unless $2 eq $name;
my $prefix = ($1 eq '---') ? $in : $out;
s,$2,${prefix}${dir}${name},;
};
--
dhd@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
next prev parent reply other threads:[~2000-08-21 13:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-17 22:25 [parisc-linux] Incompatibility of PIC and non-PIC David Huggins-Daines
2000-08-18 0:12 ` Alan Modra
2000-08-18 14:29 ` Alan Modra
2000-08-18 17:25 ` David Huggins-Daines
2000-08-18 20:14 ` David Huggins-Daines
2000-08-18 23:35 ` Alan Modra
2000-08-19 5:29 ` Alan Modra
2000-08-21 17:46 ` David Huggins-Daines
2000-08-21 19:09 ` David Huggins-Daines
2000-08-21 23:39 ` Alan Modra
2000-08-19 22:00 ` David Huggins-Daines
2000-08-20 3:07 ` Alan Modra
2000-08-20 2:43 ` Matthew Wilcox
2000-08-20 4:19 ` Alan Modra
2000-08-21 13:41 ` David Huggins-Daines [this message]
2000-08-21 13:38 ` David Huggins-Daines
[not found] <alan@linuxcare.com.au>
2000-08-23 8:49 ` Tor Arntsen
2000-08-23 9:49 ` Alan Modra
-- strict thread matches above, loose matches on Subject: below --
2000-08-23 10:31 Tor Arntsen
2000-08-23 10:46 ` Alan Modra
2000-08-23 11:26 Tor Arntsen
2000-08-23 13:51 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877l9azq81.fsf@linuxcare.com \
--to=dhd@linuxcare.com \
--cc=alan@linuxcare.com.au \
--cc=matthew@wil.cx \
--cc=parisc-linux@thepuffingroup.com \
--cc=parisc@lists.linuxcare.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox