Alt-App-makepatch

 view release on metacpan or  search on metacpan

script/applypatch  view on Meta::CPAN


=item *

First, it will extensively verify that the patch kit is complete and
did not get corrupted during transfer.

=item *

Then it will apply some heuristics to verify that the directory in
which the patch will be applied does indeed contain the expected
sources.

If a corruption or verification error is detected, B<applypatch> exits
without making changes.

=item *

If the kit is okay, and the directory seems to be the right one: it
creates new files and directories as necessary.

=item *

Then it runs the B<patch> program to apply the patch to the source files.

=item *

Upon completion, obsolete files, directories and .orig files are
removed, file modes of new files are set, and the timestamps of
all patched files are adjusted.

=back

=head1 Applypatch arguments

B<Applypatch> takes one argument, the name of the patch kit as
generated by B<makepatch>. If no name is specified, the patch kit is
read from standard input.

=head1 Applypatch options

Options are matched case insensitive, and may be abbreviated to uniqueness.

=over 4

=item B<-directory> I<dir>

The name of the source directory to be patched.

=item B<-check>

Perform the checks on the patch kit and patch directory, but do not
make any changes.

=item B<-force>

Force continuation of the patch process even when corruption or
verification errors are detected. This is very dangerous!

=item B<-retain>

Do not remove patch backup files (with extension C<.orig>) upon
completion. 

=item B<-patch> I<cmd>

The patch command to be used. Default is "C<patch -p0 -N>".
Additionally, a "C<-s>" will be added unless option B<-verbose> was
specified.

=item B<-verbose>

This option will cause B<applypatch> and the B<patch> program to emit
verbose progress information.

=item B<-quiet>

This option will cause B<applypatch> and the B<patch> program to emit
no progress information, only error messages.

=back

=head1 Environment variables

=over 4

=item SIMPLE_BACKUP_SUFFIX

The suffix used by (some versions of?) B<patch> to back up the
originals of patched files. Upon completion, these files are removed
by B<applypatch> unless the option B<-retain> was specified.
Default value if "C<.orig>".

=back

=head1 SEE ALSO

B<makepatch>(1),
B<diff>(1),
B<patch>(1),
B<perl>(1),
B<rm>(1).

=head1 AUTHOR AND CREDITS

This program is written by Johan Vromans <jvromans@squirrel.nl>.

See section AUTHOR AND CREDITS of the makepatch program for an
extensive list of people that helped one way or another in the
makepatch / applypatch project.

=head1 COPYRIGHT AND DISCLAIMER

This program is Copyright 1992,1999,2006 by Squirrel Consultancy. All
rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of either: a) the GNU General Public License as
published by the Free Software Foundation; either version 1, or (at
your option) any later version, or b) the "Artistic License" which
comes with Perl.



( run in 1.501 second using v1.01-cache-2.11-cpan-2398b32b56e )