-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathbootstrap.sh
executable file
·41 lines (36 loc) · 1.16 KB
/
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
41
#!/bin/bash
source .env
echo "cleaning up...";
rm -rf audit-protocol;
rm -rf pooler;
rm -rf logs/pooler/*;
rm -rf logs/audit-protocol/*;
echo "setting up codebase...";
git clone https://github.com/PowerLoom/audit-protocol.git;
git clone https://github.com/PowerLoom/pooler.git;
cd pooler/;
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 snapshotter/modules/computes;
cd snapshotter/modules/;
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
cd ../;
echo "bootstrapping complete!";