Skip to content

Instantly share code, notes, and snippets.

@fooforge
Forked from atomic-penguin/symbol_to_string.sh
Created July 30, 2012 12:21
Show Gist options
  • Save fooforge/3206544 to your computer and use it in GitHub Desktop.
Save fooforge/3206544 to your computer and use it in GitHub Desktop.
Foodcritic FC001 fixer script.
#!/bin/bash
if [ "$#" -eq 0 ]; then
echo "Usage: `basename $0` <cookbook directory>"
elif [ "$#" -eq 1 ]; then
find $1 -name "*[.md|.rb]" \! -name "*.erb" | xargs perl -p -e 's!\[:([a-z0-9_]+)\]![\x27$1\x27]!gi' -i
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment