builtin-mailinfo.c: check error status from rewind and ftruncate
[git/spearce.git] / git-gui / windows / git-gui.sh
blob66bbb2f8faaf83bc87819a9e288a0592f400e147
1 #!/bin/sh
2 # Tcl ignores the next line -*- tcl -*- \
3 exec wish "$0" -- "$@"
5 if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
6 set workdir [lindex $argv 1]
7 cd $workdir
8 if {[lindex [file split $workdir] end] eq {.git}} {
9 # Workaround for Explorer right click "Git GUI Here" on .git/
10 cd ..
12 set argv [lrange $argv 2 end]
13 incr argc -2
16 set bindir [file dirname \
17 [file dirname \
18 [file dirname [info script]]]]
19 set bindir [file join $bindir bin]
20 regsub -all ";" $bindir "\\;" bindir
21 set env(PATH) "$bindir;$env(PATH)"
22 unset bindir
24 source [file join [file dirname [info script]] git-gui.tcl]