]> git.ipfire.org Git - thirdparty/git.git/blame - git-gui/macosx/AppMain.tcl
Merge branch 'jc/diff-merge-base-multi'
[thirdparty/git.git] / git-gui / macosx / AppMain.tcl
CommitLineData
72a8e81d
SP
1set gitexecdir {@@gitexecdir@@}
2set gitguilib {@@GITGUI_LIBDIR@@}
3set env(PATH) "$gitexecdir:$env(PATH)"
4
5if {[string first -psn [lindex $argv 0]] == 0} {
6 lset argv 0 [file join $gitexecdir git-gui]
7}
8
9if {[file tail [lindex $argv 0]] eq {gitk}} {
7838d3fb 10 set argv0 [lindex $argv 0]
72a8e81d
SP
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)
17 }
18}
19
20unset gitexecdir gitguilib
21set argv [lrange $argv 1 end]
22source $AppMain_source