Merge commit 'junio/next' into next
[git/platforms/storm.git] / git-gui / macosx / AppMain.tcl
blob41ca08e2b7929c59806b3b07a18dbae0ebfae933
1 set gitexecdir {@@gitexecdir@@}
2 set gitguilib {@@GITGUI_LIBDIR@@}
3 set env(PATH) "$gitexecdir:$env(PATH)"
5 if {[string first -psn [lindex $argv 0]] == 0} {
6 lset argv 0 [file join $gitexecdir git-gui]
9 if {[file tail [lindex $argv 0]] eq {gitk}} {
10 set argv0 [file join $gitexecdir gitk]
11 set AppMain_source $argv0
12 } else {
13 set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
14 set AppMain_source [file join $gitguilib git-gui.tcl]
15 if {[pwd] eq {/}} {
16 cd $env(HOME)
20 unset gitexecdir gitguilib
21 set argv [lrange $argv 1 end]
22 source $AppMain_source