From: David Turner <dturner@twopensource.com>
To: git@vger.kernel.org
Cc: David Turner <dturner@twitter.com>
Subject: [PATCH] git-gui: Make git-gui lib dir configurable at runtime
Date: Mon, 21 Jul 2014 14:20:09 -0400 [thread overview]
Message-ID: <1405966809-30882-1-git-send-email-dturner@twitter.com> (raw)
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>
---
git-gui/Makefile | 3 ++-
git-gui/git-gui.sh | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/git-gui/Makefile b/git-gui/Makefile
index cde8b2e..56bf9e2 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -177,7 +177,8 @@ git-gui: GIT-VERSION-FILE GIT-GUI-VARS
echo then >>$@+ && \
echo ' 'echo \'git-gui version '$(GITGUI_VERSION)'\' >>$@+ && \
echo else >>$@+ && \
- echo ' 'exec \''$(libdir_SQ)/Git Gui.app/Contents/MacOS/$(subst \,,$(TKEXECUTABLE))'\' \
+ echo ' libdir="$$(GIT_GUI_LIB_DIR:-$(libdir_SQ))"' >>$@+ && \
+ echo ' 'exec \"'$$libdir/Git Gui.app/Contents/MacOS/$(subst \,,$(TKEXECUTABLE))'\" \
'"$$0" "$$@"' >>$@+ && \
echo fi >>$@+ && \
chmod +x $@+ && \
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index b186329..6cbb36e 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -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]]
--
1.9.1
next reply other threads:[~2014-07-21 18:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 18:20 David Turner [this message]
2014-07-21 21:06 ` [PATCH] git-gui: Make git-gui lib dir configurable at runtime Junio C Hamano
2014-07-21 21:57 ` David Turner
2014-08-10 12:03 ` Pat Thoyts
2014-08-12 16:38 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405966809-30882-1-git-send-email-dturner@twitter.com \
--to=dturner@twopensource.com \
--cc=dturner@twitter.com \
--cc=git@vger.kernel.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.