diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-30 17:40:34 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-30 17:40:34 +0100 |
commit | 6445b9067d649c83d45d9f2213e350d274060b54 (patch) | |
tree | 1925926f424e6ed85a6b91b96574d012a0946d0f /bootstrap | |
parent | 76d630e8272b0d5938d81fe8c2da65988e6c9e14 (diff) | |
download | taler-mdb-6445b9067d649c83d45d9f2213e350d274060b54.tar.gz taler-mdb-6445b9067d649c83d45d9f2213e350d274060b54.tar.bz2 taler-mdb-6445b9067d649c83d45d9f2213e350d274060b54.zip |
add bootstrap and uncrustify logic
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..79eadd6 --- /dev/null +++ b/bootstrap @@ -0,0 +1,28 @@ +#!/bin/sh + +if ! git --version >/dev/null; then + echo "git not installed" + exit 1 +fi + +# git submodule update --init + +# 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) + 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 + +autoreconf -fi |