logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

applypatch - apply 'makepatch' generated script to update a source tree

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.

       -directorydir
           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 ".orig") upon completion.

       -patchcmd
           The  patch  command  to  be  used. Default is ""patch -p0 -N"".  Additionally, a ""-s"" 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.

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.

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.

Environment Variables

       SIMPLE_BACKUP_SUFFIX
           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 "".orig"".

Name

       applypatch - apply 'makepatch' generated script to update a source tree

See Also

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

Synopsis

applypatch [ options ] patch-kit

See Also