exchange/bootstrap

38 lines
995 B
Plaintext
Raw Normal View History

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-06-08 22:35:59 +02:00
git submodule update --init
# Generate taler-error-codes.h in gana and copy it to
# src/include/taler_error_codes.h
cd contrib/gana/gnu-taler-error-codes
make
cd ../../..
cp contrib/gana/gnu-taler-error-codes/taler-error-codes.h src/include/taler_error_codes.h
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)
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
2019-09-26 13:55:48 +02:00
autoreconf -fi