3 exec python
$0 ${1+"$@"}; exit
5 # msysgit does not include dirname.exe, so this simple python
6 # script should do the trick.
11 joinchar = '\\' # allow win32..
13 joinchar = '/' # but assume unix
14 item = item.rstrip(joinchar)
15 while joinchar+joinchar in item:
16 item = item.replace(joinchar+joinchar, joinchar)
17 items = item.split(joinchar)
18 dirname = joinchar.join(items[:-1])