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

  • -directory dir β€” 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. 🧾
  • -patch cmd β€” 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. it will NOT shut up and honestly? we love that for it. πŸ—£οΈ
  • -quiet β€” this option will cause applypatch and 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 by applypatch unless the option -retain was 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.


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