-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.sh
executable file
·42 lines (28 loc) · 865 Bytes
/
setup.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
echo "Running setup-hlf github action..."
//Preequisite Step
echo "Checking prerequisites..."
echo "Installing Git..."
sudo apt-get install git
git --version
echo "Installing cURL..."
sudo apt-get install curl
curl -V
//Instantializing docker and daemon
echo "Installing docker and docker-compose..."
sudo apt-get -y install docker-compose
docker --version
docker-compose --version
echo "Starting docker daemon..."
sudo systemctl start docker
echo "Prerequisite step done!"
echo "Fetching Hyperledger Fabric install script..."
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
if [ $# -eq 0 ]
then
./install-fabric.sh
else
echo "./install-fabric.sh --fabric-version $1"
./install-fabric.sh --fabric-version $1
fi
echo "Successfully run action!"