summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 14:42:30 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 14:42:30 +0200
commit10079e7c8de9c5a8657adbe84022288c46706986 (patch)
treec541b7a1bd4dec87c85fed6a6b4a18c6ce2449ae /bootstrap
parent9d32af7facac83d853764e6f4a8c28060e631723 (diff)
uncrustify integration into bootstrap
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap19
1 files changed, 14 insertions, 5 deletions
diff --git a/bootstrap b/bootstrap
index eeb323145..1ff25a753 100755
--- a/bootstrap
+++ b/bootstrap
@@ -3,11 +3,6 @@
echo "Removing folder 'libltdl'..."
rm -rf libltdl
-# Install uncrustify format symlink (if possible)
-ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null
-
-echo "checking for libtoolize / libtool... "
-
# This is more portable than `which' but comes with
# the caveat of not(?) properly working on busybox's ash:
existence()
@@ -15,6 +10,20 @@ existence()
command -v "$1" >/dev/null 2>&1
}
+
+if existence uncrustify; then
+ echo "Installing uncrustify hook and configuration"
+ # Install uncrustify format symlink (if possible)
+ ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null
+ # Install pre-commit hook (if possible)
+ ln -s contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
+else
+ echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development"
+fi
+
+echo "checking for libtoolize / libtool... "
+
+
if existence libtool || existence libtoolize || existence glibtoolize || existence slibtool; then
autoreconf -if
. "bin/pogen.sh"