Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-18 03:52:45 +0400
committerJunio C Hamano <junkio@cox.net>2007-05-18 03:52:45 +0400
commite986e26a86616054f96373280e8f9cc89d7ea8ca (patch)
tree9a7192bd9f97ee049d3c73f76385d883d2055339 /git-gui/git-gui.sh
parent2eb54efc6c12cb20403db9a4739bd736c3bfaad1 (diff)
parentb9e7efb8b5f7d424466dd1ce61fd20658f60543f (diff)
Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui: git-gui: Gracefully handle bad TCL_PATH at compile time
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-xgit-gui/git-gui.sh29
1 files changed, 28 insertions, 1 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 2fda4c2290..0a471a5c7d 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -28,7 +28,34 @@ set oguilib {@@GITGUI_LIBDIR@@}
if {[string match @@* $oguilib]} {
set oguilib [file join [file dirname [file normalize $argv0]] lib]
}
-set auto_path [concat [list $oguilib] $auto_path]
+set idx [file join $oguilib tclIndex]
+catch {
+ set fd [open $idx r]
+ if {[gets $fd] eq {# Autogenerated by git-gui Makefile}} {
+ set idx [list]
+ while {[gets $fd n] >= 0} {
+ if {$n ne {} && ![string match #* $n]} {
+ lappend idx $n
+ }
+ }
+ } else {
+ set idx {}
+ }
+ close $fd
+}
+if {$idx ne {}} {
+ set loaded [list]
+ foreach p $idx {
+ if {[lsearch -exact $loaded $p] >= 0} continue
+ puts $p
+ source [file join $oguilib $p]
+ lappend loaded $p
+ }
+ unset loaded p
+} else {
+ set auto_path [concat [list $oguilib] $auto_path]
+}
+unset -nocomplain fd idx
if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
unset _verbose