File: dag

package info (click to toggle)
git-cola 4.14.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 6,812 kB
  • sloc: python: 37,625; sh: 298; makefile: 223; xml: 102; tcl: 62
file content (25 lines) | stat: -rwxr-xr-x 593 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# Windows doesn't have the 'dirname' command, so fake it
dirname() {
	dir=$(echo "$@" | perl -pe 's,(.*)/[^/]+,\1,')
	test "$dir" = "$1" && dir=.
	echo "$dir"
}
mydir="$(dirname "$0")"
parentdir="$(dirname "$mydir")"

# Windows uses 'git-cola.pyw' instead of 'git-cola'
COLA="$parentdir"/bin/git-dag
if test -f "$COLA".pyw; then
	COLA="$COLA".pyw
fi

# Find a suitable Python and use it to run cola
for python in "/c/Python27" "/c/Python26" "/c/Python25"; do
	if test -d "$python"; then
		PATH="$PATH":"$python"
		export PATH
		exec "$python/python.exe" "$COLA" "$@"
	fi
done
exit 1