diff options
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..a7414cd --- /dev/null +++ b/bootstrap | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if ! git --version >/dev/null; then | ||
4 | echo "git not installed" | ||
5 | exit 1 | ||
6 | fi | ||
7 | |||
8 | echo "$0: Updating submodules" | ||
9 | echo | git submodule update --init | ||
10 | |||
11 | git submodule update --init | ||
12 | |||
13 | ./contrib/gana-update.sh | ||
14 | |||
15 | # This is more portable than `which' but comes with | ||
16 | # the caveat of not(?) properly working on busybox's ash: | ||
17 | existence() | ||
18 | { | ||
19 | command -v "$1" >/dev/null 2>&1 | ||
20 | } | ||
21 | |||
22 | |||
23 | if existence uncrustify; then | ||
24 | echo "Installing uncrustify hook and configuration" | ||
25 | # Install uncrustify format symlink (if possible) | ||
26 | ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null | ||
27 | # Install pre-commit hook (if possible) | ||
28 | ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null | ||
29 | else | ||
30 | echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development" | ||
31 | fi | ||
32 | |||
33 | |||
34 | echo "$0: Running autoreconf" | ||
35 | autoreconf -if | ||