summaryrefslogtreecommitdiff
path: root/src/hub/test-bolter
blob: 24c8901e4694d99d20375f26c882550055f31e2f (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-bolter ... ]"
  exit 1
fi

TEST_D="./test"
TEST_DB="$TEST_D/$1.bolt"
shift

BIN="$(go env GOPATH)/bin/bolter"
if [ ! -x "$BIN" ]; then
  echo "bolter not found. Please run:"
  echo ""
  echo "  go get -u github.com/hasit/bolter"
  echo ""
  exit 1
fi

exec "$BIN" --file "$TEST_DB" $@