garden: automatically activate the "env3" virtualenv
[git-cola.git] / contrib / win32 / dag
blobea3790d962171464582d7b700b7d89abd64e26ab
1 #!/bin/sh
2 # Windows doesn't have the 'dirname' command, so fake it
3 dirname() {
4 dir=$(echo "$@" | perl -pe 's,(.*)/[^/]+,\1,')
5 test "$dir" = "$1" && dir=.
6 echo "$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
14 COLA="$COLA".pyw
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"
21 export PATH
22 exec "$python/python.exe" "$COLA" "$@"
24 done
25 exit 1