#!/bin/bash

python_paths=$(type -ap python)
for path in ${python_paths[@]}
do
    pythonver=`$path -c 'import site; print(site.getusersitepackages())'`;
    if [ $? == 0 ]
    then
        if [ -d $pythonver ]
        then
            if [ -f "$pythonver/WindPy.py" ];
            then
                rm -f $pythonver/WindPy.py;
                rm -f $pythonver/WindPy.pyc;
            fi
        fi
    fi
done

python3_paths=$(type -ap python3)
for path in ${python3_paths[@]}
do
    python3ver=`$path -c 'import site; print(site.getusersitepackages())'`;
    if [ $? == 0 ]
    then
        if [ -d $python3ver ]
        then
            if [ -f "$python3ver/WindPy.py" ];
            then
                rm -f $python3ver/WindPy.py;
                rm -f $python3ver/WindPy.pyc;
            fi
        fi
    fi
done
