2 # This file is in the public domain.
4 # We can't set -eu because we encounter warnings which
5 # result in stops, whereas the warnings can for now be
11 echo "Removing folder 'libltdl'..."
15 # This is more portable than `which' but comes with
16 # the caveat of not(?) properly working on busybox's ash:
19 command -v "$1" >/dev/null 2>&1
24 if existence uncrustify; then
25 echo "Installing uncrustify hook and configuration"
26 ln -fs contrib/build-common/conf/uncrustify.cfg uncrustify.cfg 2> /dev/null
27 ln -fs contrib/build-common/conf/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
29 echo "Uncrustify not detected, hook not installed."
30 echo "Please install uncrustify if you plan on doing development"
34 # yapf can be a suffixed binary, don't change the essential logic
35 # of this if you change it.
38 if existence yapf || \
39 existence yapf3.0 || \
40 existence yapf3.1 || \
41 existence yapf3.2 || \
42 existence yapf3.3 || \
43 existence yapf3.4 || \
44 existence yapf3.5 || \
45 existence yapf3.6 || \
46 existence yapf3.7 || \
47 existence yapf3.8 || \
48 existence yapf3.9 || \
49 existence yapf4.0; then
50 echo "Installing yapf symlink"
51 ln -fs contrib/build-common/conf/.style.yapf .style.yapf 2> /dev/null
53 echo "yapf not detected, please install yapf if you plan on contributing python code"
59 echo "checking for libtoolize / libtool... "
61 if existence libtool || \
62 existence libtoolize || \
63 existence glibtoolize || \
64 existence slibtool; then
68 echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
75 # Try to update the submodule. Since bootstrap
76 # is also invoked by distributors, we must
77 # ignore any failing of this function as we
78 # could have no outgoing network connection
79 # in a restricted environment.
80 if ! git --version >/dev/null; then
81 echo "git not installed, skipping submodule update"
83 git submodule update --init || true
84 git submodule update --recursive --remote || true
85 git submodule sync || true