aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-11-19 19:34:18 +0000
committerng0 <ng0@n0.is>2019-11-19 19:34:18 +0000
commit5be2c3823065e40ee94be79deeeaa709eb006ef8 (patch)
treee3de5ba58780d872a0a093a05f3c8cb763e61d07 /bootstrap
parentfb8cb824e2e258bae6135ffd1c1223a1e76a8887 (diff)
downloadgnunet-fuse-5be2c3823065e40ee94be79deeeaa709eb006ef8.tar.gz
gnunet-fuse-5be2c3823065e40ee94be79deeeaa709eb006ef8.zip
extend bootstrap script for uncrustify
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap50
1 files changed, 49 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index 61009b6..efeb261 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,3 +1,51 @@
1#!/bin/sh 1#!/bin/sh
2autoreconf -fi
3 2
3
4# This is more portable than `which' but comes with
5# the caveat of not(?) properly working on busybox's ash:
6existence()
7{
8 command -v "$1" >/dev/null 2>&1
9}
10
11check_uncrustify()
12{
13 if existence uncrustify; then
14 echo "Installing uncrustify hook and configuration"
15 ln -fs contrib/build-common/conf/uncrustify.cfg uncrustify.cfg 2> /dev/null
16 ln -fs contrib/build-common/conf/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
17 else
18 echo "Uncrustify not detected, hook not installed."
19 echo "Please install uncrustify if you plan on doing development"
20 fi
21}
22
23submodules()
24{
25 # Try to update the submodule. Since bootstrap
26 # is also invoked by distributors, we must
27 # ignore any failing of this function as we
28 # could have no outgoing network connection
29 # in a restricted environment.
30 if ! git --version >/dev/null; then
31 echo "git not installed, skipping submodule update"
32 else
33 git submodule update --init || true
34 git submodule update --recursive --remote || true
35 git submodule sync || true
36 fi
37}
38
39auto_reconf()
40{
41 autoreconf -fi
42}
43
44main()
45{
46 submodules
47 check_uncrustify
48 auto_reconf
49}
50
51main "$@"