[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/03: bootstrap: added fallback for uncrustify conf ins
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/03: bootstrap: added fallback for uncrustify conf installation |
Date: |
Thu, 28 Dec 2023 07:30:46 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit c9402fb97193c6a6235ec5d59abb544971c4a377
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Dec 28 09:24:24 2023 +0300
bootstrap: added fallback for uncrustify conf installation
---
bootstrap | 24 +++++++++++++++---------
1 file 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
if test -f uncrustify.cfg; then
echo "Uncrustify configuration already exists, skipping installation
from the upstream file."
else
- echo "Installing configuration"
- ln -s contrib/uncrustify.cfg uncrustify.cfg
+ echo "Installing libmicrohttpd uncrustify configuration"
+ ln -s contrib/uncrustify.cfg uncrustify.cfg || \
+ cp contrib/uncrustify.cfg uncrustify.cfg || \
+ echo "Failed to install uncrustify configuration file" 1>&2
fi
- if test -d '.git'; then
- if test -f .git/hooks/pre-commit; then
- echo "Pre-commit git hook already exists, skipping installation from
the upstream file."
+ if test -f uncrustify.cfg; then
+ if test -d '.git'; then
+ if test -f .git/hooks/pre-commit; then
+ echo "Pre-commit git hook already exists, skipping installation from
the upstream file."
+ else
+ echo "Installing uncrustify pre-commit git hook"
+ ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit || \
+ cp ../../contrib/uncrustify_precommit .git/hooks/pre-commit || \
+ echo "Failed to install pre-commit git hook" 1>&2
+ fi
else
- echo "Installing uncrustify pre-commit git hook"
- ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit
+ echo "No '.git' directory found, skipping installation of pre-commit
git hook."
fi
- else
- echo "No '.git' directory found, skipping installation of pre-commit git
hook."
fi
else
echo "Uncrustify not detected, hook not installed. Please install
uncrustify if you plan on doing development."
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.