forked from bauerj/electrumx-installer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.sh
executable file
·22 lines (22 loc) · 942 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
#!/bin/bash
if [ -d ~/.electrumx-installer ]; then
echo "~/.electrumx-installer already exists."
echo "Either delete the directory or run ~/.electrumx-installer/install.sh directly."
exit 1
fi
if which git > /dev/null 2>&1; then
git clone https://github.com/vergecurrency/electrumx-installer ~/.electrumx-installer
cd ~/.electrumx-installer/
else
which wget > /dev/null 2>&1 && which unzip > /dev/null 2>&1 || { echo "Please install git or wget and unzip" && exit 1 ; }
wget https://github.com/vergecurrency/electrumx-installer/archive/master.zip -O /tmp/electrumx-master.zip
unzip /tmp/electrumx-master.zip -d ~/.electrumx-installer
rm /tmp/electrumx-master.zip
cd ~/.electrumx-installer/electrumx-installer-master/
fi
if [[ $EUID -ne 0 ]]; then
which sudo > /dev/null 2>&1 || { echo "You need to run this script as root" && exit 1 ; }
sudo -H ./install.sh "$@"
else
./install.sh "$@"
fi