From 10079e7c8de9c5a8657adbe84022288c46706986 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Oct 2019 14:42:30 +0200 Subject: uncrustify integration into bootstrap --- bootstrap | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'bootstrap') 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" -- cgit v1.2.3