@matheusbsbs / matheus-bagliano / commits / 9534c9fb31
Fork 0

git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'

The new execdir is two levels below the root directory, while the old execdir 'bin' was only one level below. This commit adapts the discovery of oguilib that uses relative paths accordingly. We determine whether we have the extra level in the same way in which the Makefile defines sharedir, i.e. whether the last directory part is 'git-core'. Inspired-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Johannes Sixt committed Aug 4, 2008 at 22:09 UTC 9534c9fb31dfe4c5c367042c97a160c42b1eefdf
1 file changed +5 -1
git-gui.sh
+5 -1
@@ -52,7 +52,11 @@ catch {rename send {}} ; # What an evil concept...
52 set oguilib {@@GITGUI_LIBDIR@@}
53 set oguirel {@@GITGUI_RELATIVE@@}
54 if {$oguirel eq {1}} {
55 - set oguilib [file dirname [file dirname [file normalize $argv0]]]
55 + set oguilib [file dirname [file normalize $argv0]]
56 + if {[file tail $oguilib] eq {git-core}} {
57 + set oguilib [file dirname $oguilib]
58 + }
59 + set oguilib [file dirname $oguilib]
60 set oguilib [file join $oguilib share git-gui lib]
61 set oguimsg [file join $oguilib msgs]
62 } elseif {[string match @@* $oguirel]} {