2015-01-08 18:37:20 +01:00
|
|
|
#!/bin/sh
|
2019-10-05 15:49:41 +02:00
|
|
|
|
2020-06-08 22:35:59 +02:00
|
|
|
set -eu
|
|
|
|
|
2019-10-05 15:49:41 +02:00
|
|
|
if ! git --version >/dev/null; then
|
|
|
|
echo "git not installed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-07-22 21:27:16 +02:00
|
|
|
./contrib/gana.sh
|
2019-10-05 15:12:11 +02:00
|
|
|
|
|
|
|
# This is more portable than `which' but comes with
|
|
|
|
# the caveat of not(?) properly working on busybox's ash:
|
|
|
|
existence()
|
|
|
|
{
|
|
|
|
command -v "$1" >/dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if existence uncrustify; then
|
|
|
|
echo "Installing uncrustify hook and configuration"
|
|
|
|
# Install uncrustify format symlink (if possible)
|
2020-07-17 18:08:01 +02:00
|
|
|
ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null || true
|
2019-10-05 15:12:11 +02:00
|
|
|
# Install pre-commit hook (if possible)
|
2020-07-17 18:21:33 +02:00
|
|
|
ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null || true
|
2019-10-05 15:12:11 +02:00
|
|
|
else
|
|
|
|
echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development"
|
|
|
|
fi
|
|
|
|
|
2019-09-26 13:55:48 +02:00
|
|
|
autoreconf -fi
|