widgets.commitmsg: Factor out the 'hint' text behavior
[git-cola.git] / win32 / dag
bloba4fcf434563cbdcb7fbb86808d28322db8789335
1 #!/bin/sh
2 # This should work with either Python2.5 or Python2.6.
4 # Windows doesn't have the 'dirname' command, so fake it
5 dirname() {
6 dir=$(echo "$@" | perl -pe 's,(.*)/[^/]+,\1,')
7 test "$dir" = "$1" && dir=.
8 echo "$dir"
10 mydir="$(dirname "$0")"
11 parentdir="$(dirname "$mydir")"
13 # Windows uses 'git-cola.pyw' instead of 'git-cola'
14 COLA="$parentdir"/bin/git-dag
15 if test -f "$COLA".pyw; then
16 COLA="$COLA".pyw
19 # Find a suitable Python and use it to run cola
20 for python in "/c/Python26" "/c/Python25"; do
21 if test -d "$python"; then
22 PATH="$PATH":"$python"
23 export PATH
24 exec "$python/python.exe" "$COLA" "$@"
26 done
27 exit 1