diff options
author | ng0 <ng0@n0.is> | 2019-11-17 00:12:54 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-17 00:12:54 +0000 |
commit | 96031dd3015c8e911423e83af51d3566f4014b11 (patch) | |
tree | 00971940e59a3659990212a71386feda5ec9bd8b /bootstrap | |
parent | 1ccee630f7b1fa2410459af19f87e49aed2591ff (diff) | |
download | gnunet-96031dd3015c8e911423e83af51d3566f4014b11.tar.gz gnunet-96031dd3015c8e911423e83af51d3566f4014b11.zip |
bootstrap
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 126 |
1 files changed, 69 insertions, 57 deletions
@@ -1,7 +1,16 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | echo "Removing folder 'libltdl'..." | 3 | |
4 | rm -rf libltdl | 4 | # We can't set -eu because we encounter warnings which |
5 | # result in stops, whereas the warnings can for now be | ||
6 | # safely ignored. | ||
7 | # set -eu | ||
8 | |||
9 | cleanup() | ||
10 | { | ||
11 | echo "Removing folder 'libltdl'..." | ||
12 | rm -rf libltdl | ||
13 | } | ||
5 | 14 | ||
6 | # This is more portable than `which' but comes with | 15 | # This is more portable than `which' but comes with |
7 | # the caveat of not(?) properly working on busybox's ash: | 16 | # the caveat of not(?) properly working on busybox's ash: |
@@ -10,65 +19,68 @@ existence() | |||
10 | command -v "$1" >/dev/null 2>&1 | 19 | command -v "$1" >/dev/null 2>&1 |
11 | } | 20 | } |
12 | 21 | ||
13 | if existence uncrustify; then | 22 | check_uncrustify() |
14 | echo "Installing uncrustify hook and configuration" | 23 | { |
15 | # Install uncrustify format symlink (if possible) | 24 | if existence uncrustify; then |
16 | ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null | 25 | echo "Installing uncrustify hook and configuration" |
17 | # Install pre-commit hook (if possible) | 26 | # Install uncrustify format symlink (if possible) |
18 | ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null | 27 | ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null |
19 | else | 28 | # Install pre-commit hook (if possible) |
20 | echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development" | 29 | ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null |
21 | fi | 30 | else |
22 | 31 | echo "Uncrustify not detected, hook not installed." | |
32 | echo "Please install uncrustify if you plan on doing development" | ||
33 | fi | ||
34 | } | ||
23 | 35 | ||
24 | # yapf can be a suffixed binary, don't change the essential logic | 36 | # yapf can be a suffixed binary, don't change the essential logic |
25 | # of this if you change it. | 37 | # of this if you change it. |
26 | if existence yapf || existence yapf3.0 || existence yapf3.1 || existence yapf3.2 || existence yapf3.3 || existence yapf3.4 || existence yapf3.5 || existence yapf3.6 || existence yapf3.7 || existence yapf3.8 || existence yapf3.9 || existence yapf4.0; then | 38 | check_yapf() |
27 | echo "Installing yapf symlink" | 39 | { |
28 | # Install yapf style symlink (if possible) | 40 | if existence yapf || \ |
29 | ln -s contrib/conf/.style.yapf 2> /dev/null | 41 | existence yapf3.0 || \ |
30 | else | 42 | existence yapf3.1 || \ |
31 | echo "yapf not detected, please install yapf if you plan on contributing python code" | 43 | existence yapf3.2 || \ |
32 | fi | 44 | existence yapf3.3 || \ |
45 | existence yapf3.4 || \ | ||
46 | existence yapf3.5 || \ | ||
47 | existence yapf3.6 || \ | ||
48 | existence yapf3.7 || \ | ||
49 | existence yapf3.8 || \ | ||
50 | existence yapf3.9 || \ | ||
51 | existence yapf4.0; then | ||
52 | echo "Installing yapf symlink" | ||
53 | ln -s contrib/conf/.style.yapf 2> /dev/null | ||
54 | else | ||
55 | echo "yapf not detected, please install yapf if you plan on contributing python code" | ||
56 | fi | ||
57 | } | ||
33 | 58 | ||
34 | # if test $1 = "-d"; then | 59 | check_libtool() |
35 | # if existence texi2mdoc; then | 60 | { |
36 | # echo "texi2mdoc: exists, pass --enable-texi2mdoc-generation to configure" | 61 | echo "checking for libtoolize / libtool... " |
37 | # else | ||
38 | # dir=$(dirname "$(readlink -f -- "$0")") | ||
39 | # mkdir -p $dir/contrib/vendored | ||
40 | # cd contrib/vendored | ||
41 | # if existence curl; then | ||
42 | # curl --output texi2mdoc-0.1.2.tgz https://mandoc.bsd.lv/texi2mdoc/snapshots/texi2mdoc-0.1.2.tgz | ||
43 | # elif existence wget; then | ||
44 | # wget https://mandoc.bsd.lv/texi2mdoc/snapshots/texi2mdoc-0.1.2.tgz | ||
45 | # elif existence ftp; then | ||
46 | # ftp https://mandoc.bsd.lv/texi2mdoc/snapshots/texi2mdoc-0.1.2.tgz | ||
47 | # elif existence fetch; then | ||
48 | # fetch https://mandoc.bsd.lv/texi2mdoc/snapshots/texi2mdoc-0.1.2.tgz | ||
49 | # else | ||
50 | # echo "skipping texi2mdoc build, no ftp or curl or wget or fetch found" | ||
51 | # fi | ||
52 | # if test -e texi2mdoc-0.1.2.tgz; then | ||
53 | # tar xzf texi2mdoc-0.1.2.tgz | ||
54 | # cd texi2mdoc-0.1.2 | ||
55 | # dir=$(dirname "$(readlink -f -- "$0")") | ||
56 | # make | ||
57 | # echo "please prepend or append $dir/contrib/vendored/texi2mdoc/ to your PATH before running configure" | ||
58 | # echo "and pass --enable-texi2mdoc-generation to configure" | ||
59 | # else | ||
60 | # echo "no texi2mdoc, skipping" | ||
61 | # fi | ||
62 | # fi | ||
63 | # fi | ||
64 | 62 | ||
63 | if existence libtool || \ | ||
64 | existence libtoolize || \ | ||
65 | existence glibtoolize || \ | ||
66 | existence slibtool; then | ||
67 | autoreconf -if | ||
68 | . "bin/pogen.sh" | ||
69 | else | ||
70 | echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2; | ||
71 | exit 1 | ||
72 | fi | ||
73 | } | ||
65 | 74 | ||
66 | echo "checking for libtoolize / libtool... " | 75 | main() |
76 | { | ||
77 | cleanup | ||
78 | sleep 1 | ||
79 | check_uncrustify | ||
80 | sleep 1 | ||
81 | check_yapf | ||
82 | sleep 1 | ||
83 | check_libtool | ||
84 | } | ||
67 | 85 | ||
68 | if existence libtool || existence libtoolize || existence glibtoolize || existence slibtool; then | 86 | main "$@" |
69 | autoreconf -if | ||
70 | . "bin/pogen.sh" | ||
71 | else | ||
72 | echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2; | ||
73 | exit 1 | ||
74 | fi | ||