diff options
author | ng0 <ng0@n0.is> | 2019-11-17 01:10:13 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-17 01:10:13 +0000 |
commit | d826278ee3c799eeae0f2633258c44725a688a8f (patch) | |
tree | 001f5c040ac53594514913020774f7416ad24515 | |
parent | ed7e4ab51d0f647c8c4e36f06cca4a5c8a61b132 (diff) | |
download | gnunet-d826278ee3c799eeae0f2633258c44725a688a8f.tar.gz gnunet-d826278ee3c799eeae0f2633258c44725a688a8f.zip |
bootstrap: add git submodule sync. force symlinks.
-rwxr-xr-x | bootstrap | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -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 | ||
73 | submodules() | ||
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 | |||
73 | main() | 89 | main() |
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 |