#!/bin/sh

# wrap-for-bin.sh: Template for git executable wrapper scripts
# to run test suite against sandbox, but with only bindir-installed
# executables in PATH.  The Makefile copies this into various
# files in bin-wrappers, substituting
# /var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0, /var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/templates/blt and /var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/git-upload-archive.

GIT_EXEC_PATH='/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0'
if test -n "$NO_SET_GIT_TEMPLATE_DIR"
then
	unset GIT_TEMPLATE_DIR
else
	GIT_TEMPLATE_DIR='/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/templates/blt'
	export GIT_TEMPLATE_DIR
fi
MERGE_TOOLS_DIR='/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/mergetools'
GITPERLLIB='/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/perl/build/lib'"${GITPERLLIB:+:$GITPERLLIB}"
GIT_TEXTDOMAINDIR='/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/po/build/locale'
PATH='/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/bin-wrappers:'"$PATH"

export MERGE_TOOLS_DIR GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR

case "$GIT_DEBUGGER" in
'')
	exec "/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/git-upload-archive" "$@"
	;;
1)
	unset GIT_DEBUGGER
	exec gdb --args "/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/git-upload-archive" "$@"
	;;
*)
	GIT_DEBUGGER_ARGS="$GIT_DEBUGGER"
	unset GIT_DEBUGGER
	exec ${GIT_DEBUGGER_ARGS} "/var/cache/pagbuild/work/src-git-2.56.0/git-2.56.0/git-upload-archive" "$@"
	;;
esac
