Created
January 14, 2012 01:15
-
-
Save manifestuk/1609707 to your computer and use it in GitHub Desktop.
Output a list of every extension hook for a given ExpressionEngine installation
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
# Description: | |
# A couple of useful bash one-liners for finding all of the extension hooks in | |
# a given ExpressionEngine installation. Here's what it does: | |
# | |
# 1. Finds all of the native hooks, and any third-party hooks; | |
# 2. Sorts them alphabetically; | |
# 3. Outputs them to STDOUT or a file of your choosing. | |
# | |
# Usage: | |
# CD to the `/system/expressionengine/` directory of your site, and run | |
# one of the following commands. | |
# Option A: Output to STDOUT. | |
grep -ERho "$this\->(?:EE\->)?extensions\->(?:universal_)?call\('([a-z_]+)" ./ | awk '{split($0, arr, "("); print substr(arr[2], 2);}' | sort | |
# Option B: Output to a file. | |
grep -ERho "$this\->(?:EE\->)?extensions\->(?:universal_)?call\('([a-z_]+)" ./ | awk '{split($0, arr, "("); print substr(arr[2], 2);}' | sort -o /path/to/your/file.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment