2007-10-10 06:58:59 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Tcl ignores the next line -*- tcl -*- \
|
|
|
|
exec wish "$0" -- "$@"
|
|
|
|
|
|
|
|
if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
|
2009-03-31 23:55:39 +00:00
|
|
|
set workdir [lindex $argv 1]
|
|
|
|
cd $workdir
|
|
|
|
if {[lindex [file split $workdir] end] eq {.git}} {
|
|
|
|
# Workaround for Explorer right click "Git GUI Here" on .git/
|
|
|
|
cd ..
|
|
|
|
}
|
2007-10-10 06:58:59 +00:00
|
|
|
set argv [lrange $argv 2 end]
|
|
|
|
incr argc -2
|
|
|
|
}
|
|
|
|
|
2010-02-27 20:47:42 +00:00
|
|
|
set basedir [file dirname \
|
2008-07-27 16:49:43 +00:00
|
|
|
[file dirname \
|
|
|
|
[file dirname [info script]]]]
|
2010-02-27 20:47:42 +00:00
|
|
|
set bindir [file join $basedir bin]
|
|
|
|
set bindir "$bindir;[file join $basedir mingw bin]"
|
2008-07-27 16:49:43 +00:00
|
|
|
regsub -all ";" $bindir "\\;" bindir
|
|
|
|
set env(PATH) "$bindir;$env(PATH)"
|
|
|
|
unset bindir
|
2007-10-10 06:58:59 +00:00
|
|
|
|
|
|
|
source [file join [file dirname [info script]] git-gui.tcl]
|