APPLYPATCH(1p)
π applypatch β the glow-up your source tree deserves π
okay so bestie, you know how makepatch makes you a lil patch kit? this is the other half of that situationship. this page is from section 1p of the manual (the perl-contributed one, iykyk), and it's literally just here to walk you through it. no cap.
β¨ SYNOPSIS β¨
applypatch [ options ] patch-kit
π¦ DESCRIPTION π¦
applypatch applies a patch kit β the exact kind that the makepatch program generates. and the way it does that? it's giving a whole five-step main character arc:
- first, it will extensively verify that the patch kit is complete and did not get corrupted during transfer. like, it's checking everything. thorough queen behavior. π
- 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. it does NOT play games. no mess, no stress. π
- if the kit is okay, and the directory seems to be the right one: it creates new files and directories as necessary. slay.
- then it runs the
patchprogram to apply the patch to the source files. - upon completion, obsolete files, directories and
.origfiles are removed, file modes of new files are set, and the timestamps of all patched files are adjusted. it's giving β¨*aftercare*β¨ fr fr.
πΈ 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. shy king behavior, honestly. π
π Applypatch options π
heads up bestie: options are matched case insensitive, and may be abbreviated to uniqueness. so yes, you can be lazy. iconic.
-directorydir β the name of the source directory to be patched. that's the vibe. π-checkβ perform the checks on the patch kit and patch directory, but do not make any changes. it's the "look but don't touch" of options, lowkey respectful. π-forceβ force continuation of the patch process even when corruption or verification errors are detected.
β οΈ This is very dangerous! like, actually. not cute dangerous. real dangerous. π
-retainβ do not remove patch backup files (with extension".orig") upon completion. keep the receipts, bestie. π§Ύ-patchcmd β the patch command to be used. default is"patch -p0 -N". additionally, a"-s"will be added unless option-verbosewas specified. π οΈ-verboseβ this option will causeapplypatchand the patch program to emit verbose progress information. it will NOT shut up and honestly? we love that for it. π£οΈ-quietβ this option will causeapplypatchand the patch program to emit no progress information, only error messages. βοΈ silent but deadly (in a good way).
π 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 byapplypatchunless the option-retainwas specified. default value is".orig". note the lil question mark in the original, bestie β even the docs aren't 100% on which versions do this. we stay honest. π«Ά
β SEE ALSO β
makepatch(1), diff(1), patch(1), perl(1), rm(1).
π AUTHOR AND CREDITS π
this program is written by Johan Vromans <jvromans@squirrel.nl>. legend behavior. π
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. it takes a village, periodt.
π 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.
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see either the GNU General Public License or the Artistic License for more details.
no warranty bestie, read the fine print before you come for me. π
and that's the whole page, babe! this one shipped as part of perl v5.34.0, dated 2022-08-25 β so if you ever need to cite your sources, that's the era. go forth and patch responsibly π¦β¨π
π¦ where this page comes from
- debian bookworm: makepatch 2.03-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu noble: makepatch 2.03-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms