Created
April 29, 2014 23:20
-
-
Save xiii/044b4fe2d08cfc63d69e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
if [ $# -eq 0 ] | |
then | |
echo "Please provide an ERB file as argument eg $0 file.erb" | |
exit 1 | |
fi | |
erb -P -x -T '-' $1 | ruby -c | |
if [[ $? -ne 0 ]] | |
then | |
echo "$1 is not valid ERB" | |
exit 1 | |
else | |
echo "$1 is a valid ERB" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment