Last active
February 14, 2018 16:35
-
-
Save alOneh/bcdf87ee076e7bee8ddc14c3883f2d94 to your computer and use it in GitHub Desktop.
Little script to retrieve the templates used in you Symfony App
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
#!/bin/bash | |
# escape the slash in document root | |
DOCUMENT_ROOT=\/var\/www\/html\/ | |
SYMFONY_ENV=dev | |
# The full path is written by the Twig compiler, generally at the end of the cache file in the getSourceContext() method | |
grep -RhoP "${DOCUMENT_ROOT}.*\.html\.twig" app/cache/${SYMFONY_ENV}/twig/ | grep -v vendor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment