Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
useful commands handling Magento patches
# The patch contains binary data which makes most editors corrupt the file when saving
# use sed to remove lines - for example if you have deleted the downloader folder
sed -i '6573,6686 d' PATCH_SUPEE-8788_CE_1.7.0.2_v1-2016-10-11-06-36-18.sh
# Find the line numbers for removing
# First mentioned number until the second to last
sed -n '/diff --git downloader/,/diff --git/{=;p;}' PATCH_SUPEE-8788_CE_1.7.0.2_v1-2016-10-11-06-36-18.sh
# Check for frontend template changes
cat PATCH_SUPEE-8788_FILENAME.sh |grep 'diff --git app/design/frontend/base/default'
@sergeifilippov
Copy link

on unix based systems like macOS the commands needs to be slightly different:

sed -ie '163,7736 d' PATCH_SUPEE-8788_CE_1.7.0.2_v1-2016-10-11-06-36-18.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment