2 # Windows doesn't have the 'dirname' command, so fake it
4 dir
=$
(echo "$@" | perl
-pe 's,(.*)/[^/]+,\1,')
5 test "$dir" = "$1" && dir
=.
8 mydir
="$(dirname "$0")"
9 parentdir
="$(dirname "$mydir")"
11 # Windows uses 'git-cola.pyw' instead of 'git-cola'
12 COLA
="$parentdir"/bin
/git-dag
13 if test -f "$COLA".pyw
; then
17 # Find a suitable Python and use it to run cola
18 for python
in "/c/Python27" "/c/Python26" "/c/Python25"; do
19 if test -d "$python"; then
20 PATH
="$PATH":"$python"
22 exec "$python/python.exe" "$COLA" "$@"