X-Cart:To apply a patch by issuing the command 'patch'

From X-Cart 4 Classic
Revision as of 21:25, 26 December 2013 by Seyfin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  1. Save the text of your patch to a file (e.g. patch.diff).
  2. Copy this file (patch.diff) to the directory where X-Cart is installed.
  3. Issue the command 'patch --dry-run -p1 < patch.diff' to check the patch applicability.
  4. If there are no errors during the check-up, apply the patch by issuing the command 'patch -p1 < patch.diff'.

You can read more about 'patch' command in the manual (man patch, info patch).

If the text of the patch contains header lines like "Index: include/func/func.category.php", use -p0 option in the commands, i.e. 'patch --dry-run -p0 < patch.diff' and 'patch -p0 < patch.diff'.

See also: How to apply patches manually.