aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap23
1 files changed, 20 insertions, 3 deletions
diff --git a/bootstrap b/bootstrap
index 1160ab13c..e846307d8 100755
--- a/bootstrap
+++ b/bootstrap
@@ -23,8 +23,8 @@ check_uncrustify()
23{ 23{
24 if existence uncrustify; then 24 if existence uncrustify; then
25 echo "Installing uncrustify hook and configuration" 25 echo "Installing uncrustify hook and configuration"
26 ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null 26 ln -fs contrib/build-common/conf/uncrustify.cfg uncrustify.cfg 2> /dev/null
27 ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null 27 ln -fs contrib/build-common/conf/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
28 else 28 else
29 echo "Uncrustify not detected, hook not installed." 29 echo "Uncrustify not detected, hook not installed."
30 echo "Please install uncrustify if you plan on doing development" 30 echo "Please install uncrustify if you plan on doing development"
@@ -48,7 +48,7 @@ check_yapf()
48 existence yapf3.9 || \ 48 existence yapf3.9 || \
49 existence yapf4.0; then 49 existence yapf4.0; then
50 echo "Installing yapf symlink" 50 echo "Installing yapf symlink"
51 ln -s contrib/conf/.style.yapf 2> /dev/null 51 ln -fs contrib/build-common/conf/.style.yapf .style.yapf 2> /dev/null
52 else 52 else
53 echo "yapf not detected, please install yapf if you plan on contributing python code" 53 echo "yapf not detected, please install yapf if you plan on contributing python code"
54 fi 54 fi
@@ -70,9 +70,26 @@ check_libtool()
70 fi 70 fi
71} 71}
72 72
73submodules()
74{
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"
82 else
83 git submodule update --init || true
84 git submodule update --recursive --remote || true
85 git submodule sync || true
86 fi
87}
88
73main() 89main()
74{ 90{
75 cleanup 91 cleanup
92 submodules
76 check_uncrustify 93 check_uncrustify
77 check_yapf 94 check_yapf
78 check_libtool 95 check_libtool