-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzora.sh
74 lines (57 loc) · 2.05 KB
/
zora.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# Check if docker is installed, else install it
if command -v docker &>/dev/null; then
echo "Docker is already installed."
else
echo "Docker is not installed. Installing..."
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Install docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
fi
# Check if Git is installed
if command -v git &>/dev/null; then
echo "Git is already installed."
else
echo "Installing git"
sudo apt-get install git-all
fi
# Check if Python 3 is installed
if command -v python3 &>/dev/null; then
echo "Python 3 is already installed."
else
echo "Python 3 is not installed. Attempting to install..."
# Attempt to identify the package manager
if command -v apt-get &>/dev/null; then
# Debian-based distributions (Ubuntu, Debian)
sudo apt-get update
sudo apt-get install -y python3
elif command -v yum &>/dev/null; then
# Red Hat-based distributions (CentOS, Fedora)
sudo yum update
sudo yum install -y python3
else
echo "Could not identify package manager. Please install Python 3 manually."
exit 1
fi
# Verify Python 3 installation
if command -v python3 &>/dev/null; then
echo "Python 3 has been successfully installed."
else
echo "Failed to install Python 3."
exit 1
fi
fi
# for Zora Mainnet
export CONDUIT_NETWORK=zora-mainnet-0
git clone https://github.com/conduitxyz/node.git