summaryrefslogtreecommitdiff
path: root/src/hub/test-bolt
blob: 178718186b8d560218d8fc06a61ed825453947c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"