-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·40 lines (35 loc) · 1014 Bytes
/
bootstrap.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
#!/bin/bash
source .env
rm -rf ipfs-data;
rm -rf ipfs-export;
rm -rf redis_data;
# cleanup logs
rm -rf logs;
mkdir logs;
cd logs;
mkdir snapshotter;
mkdir local-collector;
cd ..;
if [ "$SNAPSHOT_CONFIG_REPO" ]; then
echo "Found SNAPSHOT_CONFIG_REPO ${SNAPSHOT_CONFIG_REPO}";
rm -rf config;
git clone $SNAPSHOT_CONFIG_REPO config;
cd config;
if [ "$SNAPSHOT_CONFIG_REPO_BRANCH" ]; then
echo "Found SNAPSHOT_CONFIG_REPO_BRANCH ${SNAPSHOT_CONFIG_REPO_BRANCH}";
git checkout $SNAPSHOT_CONFIG_REPO_BRANCH;
fi
cd ../;
fi
if [ "$SNAPSHOTTER_COMPUTE_REPO" ]; then
echo "Found SNAPSHOTTER_COMPUTE_REPO ${SNAPSHOTTER_COMPUTE_REPO}";
rm -rf computes;
git clone $SNAPSHOTTER_COMPUTE_REPO computes;
cd computes;
if [ "$SNAPSHOTTER_COMPUTE_REPO_BRANCH" ]; then
echo "Found SNAPSHOTTER_COMPUTE_REPO_BRANCH ${SNAPSHOTTER_COMPUTE_REPO_BRANCH}";
git checkout $SNAPSHOTTER_COMPUTE_REPO_BRANCH;
fi
cd ../;
fi
echo "bootstrapping complete!";