Created
April 15, 2013 04:31
-
-
Save carlwiedemann/5385704 to your computer and use it in GitHub Desktop.
Diffing the output from a patched drupal site (d8.localhost) to a non-patched drupal site (d8clean.localhost) using HTTPie (https://github.com/jkbr/httpie) and Kaleidescope's ksdiff (http://www.kaleidoscopeapp.com/)
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
export DRUPALCOOKIECLEAN='SESSa0e1d886dc4b4b88b3a69b139b38d0fd=NOKT1qpWWjYFp0CP3SLf8ejIA-MFrkNIg9vmPP-YEdE' | |
export DRUPALCOOKIE='SESSe9f6dd3bde2847011220467f468a895f=vQcLvAdPPC4mfmhl_kbwlf4vAhwCWm75AjsC3QGL4UU' | |
function ddiff() { | |
URL=$1 | |
# Get clean output | |
http d8clean.localhost/$URL Cookie:$DRUPALCOOKIECLEAN > /tmp/d8clean-tmp.html | |
# Get patched output | |
http d8.localhost/$URL Cookie:$DRUPALCOOKIE > /tmp/d8.html | |
# Make domains similar | |
sed -e 's/d8clean/d8/g' /tmp/d8clean-tmp.html > /tmp/d8clean.html | |
# Kaleidescope diff | |
ksdiff /tmp/d8clean.html /tmp/d8.html | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For linux users, here's a version based on this script:
https://gist.github.com/StryKaizer/5613863