Re: [PATCH 3/3] Makefile: split prefix flags from GIT-CFLAGS
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 19, 2012, 23:58 UTC
- Message-ID
- <7vy5nix3ao.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120619233659.GA6621@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Of course, I am probably one of the few people in the world who actually > wants to have 50 built versions of git on hand.
I have this script as "rungit" on my PATH and "rungit -l" shows 110+ variants. So at least there are two ;-)
-- >8 -- #!/bin/sh # Run various vintage of git
variant="${0##*/}" &&
: ${RUNGIT_BASE=$HOME/g} &&
case "$variant" in
rungit)
case $# in
0)
echo >&2 "which version?"
exit 1
;;
esac
variant=$1
shift
;;
esac &&
case "$variant" in
-l)
for d in "$RUNGIT_BASE/"git-*/bin/git
do
d=$(basename ${d%/bin/git})
d=${d#git-}
d=${d#snap-}
echo "$d"
done
exit
;;
git-*)
variant=${variant#git-} ;;
v[0-9]*)
variant=snap-$variant ;;
esac &&
d="$RUNGIT_BASE/git-$variant" &&
if test -f "$d/bin/git"
then
exec "$d/bin/git" "$@"
else
echo >&2 "$variant: No such variant for $a"
exit 1
fi