git-gui: Make git-gui lib dir configurable at runime
Introduce the GIT_GUI_LIB_DIR environment variable, to tell git-gui where to look for TCL libs. This allows a git-gui which has been built with a prefix of /foo to be run out of directory /bar. This is the equivalent of GIT_EXEC_PATH or GITPERLLIB but for git-gui's TCL libraries. Signed-off-by: David Turner <dturner@twitter.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
@ -49,7 +49,11 @@ catch {rename send {}} ; # What an evil concept...
|
||||
##
|
||||
## locate our library
|
||||
|
||||
set oguilib {@@GITGUI_LIBDIR@@}
|
||||
if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
|
||||
set oguilib $::env(GIT_GUI_LIB_DIR)
|
||||
} else {
|
||||
set oguilib {@@GITGUI_LIBDIR@@}
|
||||
}
|
||||
set oguirel {@@GITGUI_RELATIVE@@}
|
||||
if {$oguirel eq {1}} {
|
||||
set oguilib [file dirname [file normalize $argv0]]
|
||||
|
Reference in New Issue
Block a user