git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Steffen Prohaska <prohaska@zib.de>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org, Johannes Sixt <johannes.sixt@telecom.at>,
	Steffen Prohaska <prohaska@zib.de>
Subject: [PATCH 3/3] git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
Date: Sun, 27 Jul 2008 18:49:43 +0200	[thread overview]
Message-ID: <1217177383-25272-4-git-send-email-prohaska@zib.de> (raw)
In-Reply-To: <1217177383-25272-3-git-send-email-prohaska@zib.de>

git-gui needs bindir in PATH to be able to run 'git'.  bindir
however is not necessarily in PATH if started directly through a
Windows shortcut.  Therefore, we used to add the directory
git-gui is located in.  But with the new 'libexec/git-core'
layout this directory is no longer identical to bindir.

This commit modifies the wrapper script to discover the bindir
and add it to PATH.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-gui/windows/git-gui.sh |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/git-gui/windows/git-gui.sh b/git-gui/windows/git-gui.sh
index 98f32c0..53c3a94 100644
--- a/git-gui/windows/git-gui.sh
+++ b/git-gui/windows/git-gui.sh
@@ -8,9 +8,12 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
 	incr argc -2
 }
 
-set gitguidir [file dirname [info script]]
-regsub -all ";" $gitguidir "\\;" gitguidir
-set env(PATH) "$gitguidir;$env(PATH)"
-unset gitguidir
+set bindir [file dirname \
+            [file dirname \
+             [file dirname [info script]]]]
+set bindir [file join $bindir bin]
+regsub -all ";" $bindir "\\;" bindir
+set env(PATH) "$bindir;$env(PATH)"
+unset bindir
 
 source [file join [file dirname [info script]] git-gui.tcl]
-- 
1.6.0.rc0.79.gb0320

  reply	other threads:[~2008-07-27 16:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-27 16:49 [PATCH 0/3] git-gui (Windows): Adapt to new execdir 'libexec/git-core' Steffen Prohaska
2008-07-27 16:49 ` [PATCH 1/3] git-gui: Adapt discovery of oguilib to " Steffen Prohaska
2008-07-27 16:49   ` [PATCH 2/3] git-gui (Windows): Switch to relative discovery of oguilib Steffen Prohaska
2008-07-27 16:49     ` Steffen Prohaska [this message]
2008-07-27 21:24   ` [PATCH 1/3] git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core' Shawn O. Pearce
2008-07-28  5:01     ` Steffen Prohaska
2008-07-30  5:25       ` Shawn O. Pearce
2008-07-30  5:39         ` Steffen Prohaska
2008-08-03  9:35       ` Johannes Sixt
2008-08-03 10:09         ` Steffen Prohaska
2008-08-04 19:58           ` [PATCH] " Johannes Sixt
2008-08-04 20:00             ` Shawn O. Pearce
2008-08-04 20:09               ` [PATCH v2] " Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1217177383-25272-4-git-send-email-prohaska@zib.de \
    --to=prohaska@zib.de \
    --cc=git@vger.kernel.org \
    --cc=johannes.sixt@telecom.at \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).