Skip to content

Instantly share code, notes, and snippets.

@HomenSimpsor
Last active August 29, 2015 14:08
Show Gist options
  • Save HomenSimpsor/569422e65d47fb4864a1 to your computer and use it in GitHub Desktop.
Save HomenSimpsor/569422e65d47fb4864a1 to your computer and use it in GitHub Desktop.
Compare opcodes between two different git trees to verify they're the same.
#!/usr/bin/env bash
for fn in `git diff --name-only before master`; do
printf "$fn : "
if [[ -n \
$(diff \
<(php -d vld.active=1 -d vld.execute=0 -f "/home/ryan/s/fr/ui/$fn" 2>/dev/null) \
<(php -d vld.active=1 -d vld.execute=0 -f "/home/ryan/s/fr/ui-alt/$fn" 2>/dev/null) \
) ]]; then
printf "✖\n"
else
printf "✔\n"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment