#!/bin/sh
# This should work with either Python2.5 or Python2.6.

dirname() {
    dir=$(echo "$1" | perl -pe 's,(.*)/[^/]+,\1,')
    test "$dir" = "$1" && dir=.
    echo "$dir"
}

mydir="$(dirname $0)"
parentdir="$(dirname $mydir)"

for python in /c/Python26 /c/Python25; do
    if test -d "$python"; then
        PATH="$PATH":$python
        exec $python/python.exe "$parentdir"/bin/git-cola "$@"
    fi
done
exit 1
