SYNOPSIS

applypatch [ options ] patch-kit

DESCRIPTION

Applypatch applies a patch kit as generated by the makepatch program. It performs the following actions:

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

  • 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, applypatch exits without making changes.

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

  • Then it runs the patch program to apply the patch to the source files.

  • 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.

Applypatch arguments

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

Applypatch options

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

-directory dir

The name of the source directory to be patched.

-check

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

-force

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

-retain

Do not remove patch backup files (with extension \*(C`.orig\*(C') upon completion.

-patch cmd

The patch command to be used. Default is "\*(C`patch -p0 -N\*(C'\*(L". Additionally, a \*(R"\*(C`-s\*(C'" will be added unless option -verbose was specified.

-verbose

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

-quiet

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

Environment variables

\s-1SIMPLE_BACKUP_SUFFIX\s0

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

RELATED TO applypatch…

makepatch(1), diff(1), patch(1), perl(1), rm(1).

AUTHOR AND CREDITS

This program is written by Johan Vromans <[email protected]>.

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

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 \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the \*(L"Artistic License\*(R" which comes with Perl.

This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See either the \s-1GNU\s0 General Public License or the Artistic License for more details.