summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-30 17:40:34 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-30 17:40:34 +0100
commit6445b9067d649c83d45d9f2213e350d274060b54 (patch)
tree1925926f424e6ed85a6b91b96574d012a0946d0f /bootstrap
parent76d630e8272b0d5938d81fe8c2da65988e6c9e14 (diff)
downloadtaler-mdb-6445b9067d649c83d45d9f2213e350d274060b54.tar.gz
taler-mdb-6445b9067d649c83d45d9f2213e350d274060b54.tar.bz2
taler-mdb-6445b9067d649c83d45d9f2213e350d274060b54.zip
add bootstrap and uncrustify logic
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap28
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