Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 3/3] Makefile: split prefix flags from GIT-CFLAGS

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:08

Jeff King [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help