Meta/Make: allow version of git to be overridden
It gets harder than necessary to bootstrap otherwise
Junio C Hamano committed
Sep 28, 2011 at 18:12 UTC
81a1b6dfce053dcb5f6af27e38195068e14dacc3
1 file changed
+10
-7
Make
+10
-7
@@ -1,12 +1,15 @@
1
#!/bin/sh
2
3
-case "$(git version 2>/dev/null)" in
4
-"git version"*)
5
- GIT=git ;;
6
-*)
7
- echo >&2 "No git to bootstrap"
8
- exit 1 ;;
9
-esac
3
+if test -z "$GIT"
4
+then
5
+ case "$(git version 2>/dev/null)" in
6
+ "git version"*)
7
+ GIT=git ;;
8
+ *)
9
+ echo >&2 "No git to bootstrap"
10
+ exit 1 ;;
11
+ esac
12
+fi
13
14
inst_prefix=$(
15
IFS=: