Re: [PATCH] git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 4, 2008, 20:00 UTC
- Message-ID
- <20080804200049.GA29485@spearce.org>
- In-Reply-To
- <1217879912.48975f6809e10@webmail.nextra.at>
Johannes Sixt <johannes.sixt@telecom.at> wrote:
Show 12 quoted lines
> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
> index fd3875a..fa08d49 100755
> --- a/git-gui/git-gui.sh
> +++ b/git-gui/git-gui.sh
> @@ -52,7 +52,11 @@ catch {rename send {}} ; # What an evil concept...
> set oguilib {@@GITGUI_LIBDIR@@}
> set oguirel {@@GITGUI_RELATIVE@@}
> if {$oguirel eq {1}} {
> - set oguilib [file dirname [file dirname [file normalize $argv0]]]
> + set oguilib [file dirname [file normalize $argv0]]
> + if {[lindex [file split $oguilib] end] eq {git-core}} {
> + set oguilib [file dirname $oguilib]Isn't that what [file tail] does?
if {[file tail $oguilib] eq {git-core}} {But otherwise this looks good to me. I'll apply it later tonight, unless you agree that file tail is better here.
-- Shawn.