5 case "$(git version 2>/dev/null)" in
9 echo >&2 "No git to bootstrap"
18 probed
=${p%/git-active/bin}
19 if test "$probed" != "$p"
29 old_style_def_fix
=b79d18c92d9f4841a6a1a29b7b2373a8ff9871e1
33 for cv
in PYTHON_PATH
=python TCL_PATH
=tclsh TCLTKPATH
=wish
38 if test -f "/usr/bin/$cmd"
42 for p
in /usr
/bin
/usr
/local
/bin
46 echo "$var=$p/$cmd; export $var"
49 found
=$
(find "$p/$cmd"* -type f
2>/dev
/null |
head -n 1)
52 echo "$var=$found; export $var"
59 Wall
='-Wall -Wdeclaration-after-statement'
60 tests
= jobs= skip
= oldtest
=
68 OLD_ICONV
=YesPlease
; export OLD_ICONV
72 OLD_ICONV
=YesPlease
; export OLD_ICONV
76 NEEDS_CRYPTO_WITH_SSL
=YesPlease
; export NEEDS_CRYPTO_WITH_SSL
77 NO_PEDANTIC
=CannotDo Wall
=
81 old_style_def_fix
() {
82 rev=$
($GIT rev-parse HEAD
2>/dev
/null
) &&
83 case "$($GIT merge-base "$old_style_def_fix" "$rev")" in
85 printf "%s\n" "-Wold-style-definition"
91 expr "$($GIT symbolic-ref HEAD 2>/dev/null)" : 'refs/heads/\(.*\)' ||
95 determine_version
() {
96 v
=`$GIT describe HEAD`
97 expr "$v" : '.*-g[0-9a-f]*$' >/dev
/null
&& {
98 echo >&2 "You are on 'snap' but $v is not an official version."
104 determine_long_version
() {
105 $GIT describe HEAD
2>/dev
/null ||
echo unknown-g00000000 |
109 while case $# in 0) break ;; esac
112 -pedantic |
--pedantic)
113 case "$NO_PEDANTIC" in
116 O
="$O -Werror $(old_style_def_fix) -std=c99"
117 O
="$O -Wno-pointer-to-int-cast"
118 O
="$O -Wpointer-arith -Woverflow -Wunused"
122 # O="$O -fwrapv -fno-strict-overflow"
130 -noprove |
--noprove)
163 if test -z "$tests" && test -n "$skip"
165 GIT_SKIP_TESTS
="${GIT_SKIP_TESTS:-$skip}"
166 export GIT_SKIP_TESTS
168 if test -z "$oldtest" &&
169 sh
-c 'prove --version >/dev/null 2>&1' &&
170 sh
-c 'prove --exec : >/dev/null 2>&1'
172 DEFAULT_TEST_TARGET
=prove GIT_PROVE_OPTS
="$jobs"
173 export DEFAULT_TEST_TARGET GIT_PROVE_OPTS
179 branch
=$
(determine_branch
)
182 next | maint | master | pu | jch
)
183 prefix
="$inst_prefix/git-$branch"
186 v
=$
(determine_version
)
187 prefix
="$inst_prefix/git-snap-$v"
190 prefix
="$inst_prefix/git-test" ;;
194 determine_long_version
>version
197 MAN_BASE_URL="http://www.kernel.org/pub/software/scm/git/docs/"
198 ASCIIDOC_NO_ROFF=YesPlease
204 if test -z "${make:+set}" && {
205 test -x /usr
/local
/bin
/gmake ||
206 test -x /usr
/pkg
/bin
/gmake ||
207 test -x /usr
/bin
/gmake
212 if test -f /bin
/ginstall
214 set INSTALL
=ginstall
"$@"
219 if test -n "${NO_CFLAGS+set}"
221 unset OK_TO_USE_CFLAGS
225 ETC_GITCONFIG
=$prefix/etc
/gitconfig \
226 ${OK_TO_USE_CFLAGS+"CFLAGS=$CFLAGS"} \
227 ${tests:+"T=$tests"} \