generated from riscv/docs-spec-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
do
30 lines (23 loc) · 677 Bytes
/
do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# path to bundle executable
BUNDLE=${BUNDLE:-bundle}
ROOT=$(realpath $(dirname ${BASH_SOURCE[0]}))
which $BUNDLE 2>&1 > /dev/null
if [ $? -eq 1 ]; then
>&2 echo "No bundle executable found. Either install it, or set the BUNDLE environment variable to the executable path"
exit 1
fi
if [ ! -d .bundle ]; then
$BUNDLE config set --local path .bundle/gems
fi
if [ ! -d .bundle/gems ]; then
echo "Installing gems"
$BUNDLE install
fi
bundle check 2>&1 > /dev/null
if [ $? -eq 1 ]; then
echo "Installing new gems"
$BUNDLE install
fi
# pass everything to ruby
bundle exec ruby "$ROOT"/bin/do.rb -f "$ROOT"/bin/do.rake "$@"