title: How to run custom shell script file before pre commit hook
body: <p>In my python project, I have pre-commit-config.YAML where I want to create my custom file.</p>
  
  <p>The intention of this file is fail git commit if python lint errors are greater than certain numbers. The following command will be used to count lines</p>
  
  <pre><code>pylint api/ | wc -l
  </code></pre>
  
  <p>Can someone please suggest some approach. I am new to the MAC and Python ecosystem?</p>
  
  <p>EDIT
  sh file looks like this. </p>
  
  <pre><code>#!/bin/sh
  a=$(pylint source/ | wc -l)
  b=20
  
  errorsCount="$(echo "${a}" | tr -d '[:space:]')"
  
  if [ $errorsCount -gt $b ]
  then
      exit 1
  fi
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>repos:
  - repo: local
    hooks:
      - id: custom-script-file
        name: custom-script-file
        entry: hooks/pre-commit.sh
        language: script
        types: [python]
        pass_filenames: false
  </code></pre>
  
  <p>But it wouldn't worked.</p>