#!/bin/bash

# I apologize for this extremely ugly script.  I'm not very good at this.
# If you feel like cleaning this up and want me to include it in future
# releases, feel free to let me know at x.seeks@gmail.com

if [ -f /usr/local/lib/python2.6/dist-packages/pycalcount/pycalcount.py ] 

    then 
     python /usr/local/lib/python2.6/dist-packages/pycalcount/pycalcount.py $1
     exit 0
    
    else
    if [ -f /usr/local/lib/python2.5/dist-packages/pycalcount/pycalcount.py ]
     then
    python /usr/local/lib/python2.5/dist-packages/pycalcount/pycalcount.py $1
      exit 0
      
     else
      if [ -f /usr/local/lib/python2.4/dist-packages/pycalcount/pycalcount.py ]
       then
     python /usr/local/lib/python2.4/dist-packages/pycalcount/pycalcount.py $1
       exit 0
       
        else
      if [ -f /usr/local/lib/python3.1/dist-packages/pycalcount/pycalcount.py ]
        then
    python /usr/local/lib/python3.1/dist-packages/pycalcount/pycalcount.py $1 
    exit 0
    
     else
        echo "pycalcount.py not found."
           fi
          fi
         fi
        fi
