forked from ProvableHQ/workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·56 lines (42 loc) · 1.24 KB
/
install.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
echo "
Starting installation...
"
if [[ $OSTYPE == 'darwin'* ]]; then
echo "Step 0: Install Command Line Developer Tools"
# Install macOS Command Line Tools
xcode-select --install > /dev/null 2>&1
if [ 0 == $? ]; then
sleep 1
osascript <<EOD
tell application "System Events"
tell process "Install Command Line Developer Tools"
keystroke return
click button "Agree" of window "License Agreement"
end tell
end tell
EOD
else
echo " Command Line Developer Tools are already installed!"
fi
fi
# Create the .build directory, if it does not already exist.
mkdir -p .build
# Enter the .build directory.
cd .build
echo "
Step 1: Fetching the Aleo and Leo Github repositories..."
# Clone the 'aleo' repository, or pull if it already exists.
git clone https://github.com/AleoHQ/aleo.git aleo 2> /dev/null || (cd aleo ; git pull)
# Clone the 'leo' repository, or pull if it already exists.
git clone https://github.com/AleoHQ/leo.git leo 2> /dev/null || (cd leo ; git pull)
echo "
Step 2: Installing Aleo..."
# Install 'aleo'.
cd aleo && cargo install --path . && cd ..
echo "
Step 3: Installing Leo..."
# Install 'leo'.
cd leo && cargo install --path . && cd ..
echo "
Installation complete. Open a new Terminal to begin.
"