Skip to content

Instantly share code, notes, and snippets.

@balazs-endresz
Created May 16, 2016 14:32
Show Gist options
  • Save balazs-endresz/97adc525ab27952ba7426976ee1a3556 to your computer and use it in GitHub Desktop.
Save balazs-endresz/97adc525ab27952ba7426976ee1a3556 to your computer and use it in GitHub Desktop.
Find local css/js includes that don't use the static tag
find templates/ -name *.html -exec sh -c "cat {}|grep '<script' | grep -v '{% static' | grep -v 'src=\"//' | grep -v '<script>' | grep -v 'src=\"http'" \; -print
find templates/ -name *.html -exec sh -c "cat {}|grep 'stylesheet' | grep -v '{% static' | grep -v 'href=\"//' | grep -v 'href=\"http' | grep -v -P 'href=\047//' | grep -v -P 'href=\047http'" \; -print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment