aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-12-28 09:24:24 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-12-28 09:24:24 +0300
commitc9402fb97193c6a6235ec5d59abb544971c4a377 (patch)
tree0201c91e92f9ce260898546571912f58fdb60fa8
parent9c22b66afdccf6ca6e3ba69886a6e7ff60c48c67 (diff)
downloadlibmicrohttpd-c9402fb97193c6a6235ec5d59abb544971c4a377.tar.gz
libmicrohttpd-c9402fb97193c6a6235ec5d59abb544971c4a377.zip
bootstrap: added fallback for uncrustify conf installation
-rwxr-xr-xbootstrap24
1 files changed, 15 insertions, 9 deletions
diff --git a/bootstrap b/bootstrap
index e34cee56..f2ff8a0a 100755
--- a/bootstrap
+++ b/bootstrap
@@ -32,18 +32,24 @@ if have_command uncrustify; then
32 if test -f uncrustify.cfg; then 32 if test -f uncrustify.cfg; then
33 echo "Uncrustify configuration already exists, skipping installation from the upstream file." 33 echo "Uncrustify configuration already exists, skipping installation from the upstream file."
34 else 34 else
35 echo "Installing configuration" 35 echo "Installing libmicrohttpd uncrustify configuration"
36 ln -s contrib/uncrustify.cfg uncrustify.cfg 36 ln -s contrib/uncrustify.cfg uncrustify.cfg || \
37 cp contrib/uncrustify.cfg uncrustify.cfg || \
38 echo "Failed to install uncrustify configuration file" 1>&2
37 fi 39 fi
38 if test -d '.git'; then 40 if test -f uncrustify.cfg; then
39 if test -f .git/hooks/pre-commit; then 41 if test -d '.git'; then
40 echo "Pre-commit git hook already exists, skipping installation from the upstream file." 42 if test -f .git/hooks/pre-commit; then
43 echo "Pre-commit git hook already exists, skipping installation from the upstream file."
44 else
45 echo "Installing uncrustify pre-commit git hook"
46 ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit || \
47 cp ../../contrib/uncrustify_precommit .git/hooks/pre-commit || \
48 echo "Failed to install pre-commit git hook" 1>&2
49 fi
41 else 50 else
42 echo "Installing uncrustify pre-commit git hook" 51 echo "No '.git' directory found, skipping installation of pre-commit git hook."
43 ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit
44 fi 52 fi
45 else
46 echo "No '.git' directory found, skipping installation of pre-commit git hook."
47 fi 53 fi
48else 54else
49 echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development." 55 echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development."