* Re: Humble request of 'git' developers + [PATCH] Slight enhancement of GIT wrapper
@ 2005-04-23 23:47 Pavel Pisa
0 siblings, 0 replies; only message in thread
From: Pavel Pisa @ 2005-04-23 23:47 UTC (permalink / raw)
To: Jeff Garzik, git, Petr Baudis
Hello All,
I am resending patch from 13 April
which I have send Petr Baudis.
He has said, that he combines
best ideas from more similar patches
but he has not found time for that probably.
It is updated according his
and Johannes Schindelin's remarks.
It enables to move all growing number
of git scripts and programs to the any
directory out of the search path.
Actually only "git" script needs to be
linked symbolically to some directory
on the search path. This solution worked
for me with many versions of "git-pasky".
I would vote for this solution
and for single public exposed multiplexer
executable script.
It is how big portable place independent
projects solve hiding of garbage from
the search path.
Best wishes
Pavel Pisa
e-mail: pisa@cmp.felk.cvut.cz
www: http://cmp.felk.cvut.cz/~pisa
work: http://www.pikron.com
Slight enhancement of GIT wrapper
Git multiplexer and scripts can reside in non PATH directories
and linking git multiplexer into some searchables dirs makes the trick.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
--- git.orig 2005-04-24 00:12:56.000000000 +0200
+++ git 2005-04-24 01:28:01.000000000 +0200
@@ -17,6 +17,28 @@
exit 1
}
+if [ -z "$GIT_TOOLS_DIR" ] ; then
+ GIT_MUXBINARY_DIR="$(dirname "$0")"
+ if [ -h "$0" ]; then
+ #GIT_TOOLS_DIR="$(ls -l "$0" | sed 's/^.*-> *\(.*\) *$/\1/')"
+ GIT_TOOLS_DIR="$(ls -L "$0")"
+ GIT_TOOLS_DIR="$(dirname "$GIT_TOOLS_DIR")"
+ GIT_TOOLS_DIR="$(cd "$GIT_MUXBINARY_DIR" ; cd "$GIT_TOOLS_DIR" ; pwd )"
+ else
+ GIT_TOOLS_DIR="$(cd "$GIT_MUXBINARY_DIR" ; pwd )"
+ fi
+
+ if [ -z "$(echo :$PATH: | sed -n -e 's#:'"$GIT_TOOLS_DIR"':#yes#p' )" ] ; then
+ export PATH="$GIT_TOOLS_DIR:$PATH"
+ fi
+
+ export GIT_TOOLS_DIR
+fi
+
+#echo GIT_TOOLS_DIR=$GIT_TOOLS_DIR
+#echo PATH=$PATH
+#echo CWD=$(pwd)
+#exit
help () {
cat <<__END__
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-23 23:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-23 23:47 Humble request of 'git' developers + [PATCH] Slight enhancement of GIT wrapper Pavel Pisa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox