Created
October 18, 2014 15:12
-
-
Save piccaso/4b1af91661f535b3818a to your computer and use it in GitHub Desktop.
patching Drupal 7 SA-CORE-2014-005-D7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O /tmp/SA-CORE-2014-005-D7.patch https://www.drupal.org/files/issues/SA-CORE-2014-005-D7.patch && chmod 0600 /tmp/SA-CORE-2014-005-D7.patch | |
cd /var/www | |
find -path '*/includes/database/database.inc' | |
#make backups | |
for f in $( find -path '*/includes/database/database.inc' ); do cp -av $f $f.backup-$(date +"%Y-%m-%d-%H%M%S"); done | |
#dry run | |
for f in $( find -path '*/includes/database/database.inc' ); do patch --dry-run $f < /tmp/SA-CORE-2014-005-D7.patch; done | |
#dry run (and inspect) | |
for f in $( find -path '*/includes/database/database.inc' ); do patch --verbose --dry-run $f < /tmp/SA-CORE-2014-005-D7.patch; done | less | |
#apply patch | |
for f in $( find -path '*/includes/database/database.inc' ); do patch $f < /tmp/SA-CORE-2014-005-D7.patch; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment