diff --git a/run-test-hook.sh b/run-test-hook.sh index 6e40947..e7b6bbf 100755 --- a/run-test-hook.sh +++ b/run-test-hook.sh @@ -1,9 +1,16 @@ #!/usr/bin/env bash +while getopts d: option +do +case "${option}" +in +d) DIRECTORY=${OPTARG};; +esac +done -if [ `grep -r '| raw' client/templates/* | grep -v 'assetSource' | wc -l` -gt 1 ] +if [ `grep -r '\(|\| |\)raw' ${DIRECTORY}/* | grep -v 'assetSource' | wc -l` -gt 1 ] then - echo "Raw in directory" + echo "Instances of raw in ${DIRECTORY}. Please remove" exit 1 else exit 0