git-gui / macosx / AppMain.tclon commit grep.c: use error_errno() (7645d8f)
   1set gitexecdir {@@gitexecdir@@}
   2if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
   3        set gitguilib $::env(GIT_GUI_LIB_DIR)
   4} else {
   5        set gitguilib {@@GITGUI_LIBDIR@@}
   6}
   7
   8set env(PATH) "$gitexecdir:$env(PATH)"
   9
  10if {[string first -psn [lindex $argv 0]] == 0} {
  11        lset argv 0 [file join $gitexecdir git-gui]
  12}
  13
  14if {[file tail [lindex $argv 0]] eq {gitk}} {
  15        set argv0 [lindex $argv 0]
  16        set AppMain_source $argv0
  17} else {
  18        set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
  19        set AppMain_source [file join $gitguilib git-gui.tcl]
  20        if {[info exists env(PWD)]} {
  21                cd $env(PWD)
  22        } elseif {[pwd] eq {/}} {
  23                cd $env(HOME)
  24        }
  25}
  26
  27unset gitexecdir gitguilib
  28set argv [lrange $argv 1 end]
  29source $AppMain_source