From: Bryan Larsen Date: Mon, 11 Jul 2005 10:14:38 GMT Subject: [PATCH 1/6] git-gnu-progs: parameterize git Message-ID: <20050711101428.10318.90621.sendpatchset@bryan-larsens-ibook-g4.local> In-Reply-To: <20050711101417.10318.64006.sendpatchset@bryan-larsens-ibook-g4.local> Patch git so that the utilities 'cp' 'stat' 'xargs' and 'date' are configurable. Git requires the gnu versions of these tools, and on some BSD derived systems, the gnu versions of these tools have a different name. Signed-off-by: Bryan Larsen --- git-clone-script | 4 +++- git-prune-script | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/git-clone-script b/git-clone-script --- a/git-clone-script +++ b/git-clone-script @@ -5,6 +5,8 @@ # # Clone a repository into a different directory that does not yet exist. +CP=cp + usage() { echo >&2 "* git clone [-l] " exit 1 @@ -68,7 +70,7 @@ yes,yes) l=l fi && rm -f "$D/.git/objects/sample" && - cp -r$l "$repo/objects" "$D/.git/" || exit 1 + ${CP} -r$l "$repo/objects" "$D/.git/" || exit 1 # Make a duplicate of refs and HEAD pointer HEAD= diff --git a/git-prune-script b/git-prune-script --- a/git-prune-script +++ b/git-prune-script @@ -1,5 +1,7 @@ #!/bin/sh +XARGS=xargs + . git-sh-setup-script || die "Not a git archive" dryrun= @@ -20,6 +22,6 @@ sed -ne '/unreachable /{ s|\(..\)|\1/|p }' | { cd "$GIT_OBJECT_DIRECTORY" || exit - xargs -r $dryrun rm -f + ${XARGS} -r $dryrun rm -f }