-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
41 lines (37 loc) · 1.21 KB
/
entrypoint.sh
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
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -Eeo pipefail
# prepare tracks directory
TRACKS_DIR=~/.rally/benchmarks/tracks
mkdir -p "$TRACKS_DIR"
cd "$TRACKS_DIR"
if [[ "$*" =~ "camden_demo" ]]; then
echo "camden_demo repository selected"
# check for test data and get it if needed
# match these values to those in camden_demo/_scripts/setup.sh
DATA_PATH=~/.rally/benchmarks/data/companies
FILENAME=documents
if [[ ! -f $DATA_PATH/$FILENAME.json || ! -f $DATA_PATH/$FILENAME.json.bz2 ]]; then
echo "Test data files not found. Starting setup script."
git clone https://github.com/RIKnight/camden_demo.git
~/.rally/benchmarks/tracks/camden_demo/_scripts/setup.sh
else
echo "Test data files found."
fi
elif [[ "$*" =~ "openfda_testing" ]]; then
echo "openfda_testing repository selected"
if [[ ! -d "openfda_testing" ]]; then
git clone https://github.com/RIKnight/openfda_testing.git
fi
else
# copy local tracks
echo "Copying local tracks..."
cp -r /tracks/* "$TRACKS_DIR"/
fi
if [[ $1 == *"bash"* || $1 == *"sh"* ]]; then
: # noop
elif [[ $1 != "esrally" ]]; then
set -- esrally "$@"
fi
# echo "Now in entrypoint script..."
# echo "$@"
exec "$@"