summaryrefslogtreecommitdiff
path: root/src/hub/test-bolt
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-05-06 02:30:32 +0200
committerChristian Pointner <equinox@spreadspace.org>2017-05-06 02:30:32 +0200
commit24ffb0a92710acf49119378486409ca3c13ea8de (patch)
tree8c845dc638c7ea2c9c55e579101c24a089aff359 /src/hub/test-bolt
parentfix last commit (diff)
parenthandling for forwarder hubs works now (diff)
Merge branch 'bolt'
Diffstat (limited to 'src/hub/test-bolt')
-rwxr-xr-xsrc/hub/test-bolt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/hub/test-bolt b/src/hub/test-bolt
new file mode 100755
index 0000000..1787181
--- /dev/null
+++ b/src/hub/test-bolt
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <db-name> [ ... args-to-bolt ... ]"
+ exit 1
+fi
+
+TEST_D="./test"
+TEST_DB="$TEST_D/$1.bolt"
+shift
+
+BIN="$(go env GOPATH)/bin/bolt"
+if [ ! -x "$BIN" ]; then
+ echo "bolt not found. Please run:"
+ echo ""
+ echo " go get -u github.com/boltdb/bolt/..."
+ echo ""
+ exit 1
+fi
+
+exec "$BIN" $@ "$TEST_DB"