-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-scripts.sh
More file actions
executable file
·74 lines (50 loc) · 1.37 KB
/
install-scripts.sh
File metadata and controls
executable file
·74 lines (50 loc) · 1.37 KB
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
69
70
71
72
73
74
#!/usr/bin/env bash
PWD=$(pwd)
CWD=$(cwd)
WALLET_ADDR=""
echo ""
echo "PWD [${PWD}]"
echo ""
while true
do
echo ""
echo "Only run this script once to install."
echo "Do NOT move the files once installed!"
echo ""
read -p "Ok? [Y/y/N/n] " ANSWER
case $ANSWER in
[yY]* ) break;;
[nN]* ) exit;;
* ) echo "Only enter [Y/y/N/n] please!.";
esac
done
while true
do
echo ""
if [[ "$WALLET_ADDR" == "WALLET_ADDRESS_HERE" || -z "${WALLET_ADDR}" ]] ; then
echo "No wallet address is set! You may edit this script or enter it below."
read -p "Enter wallet address: " WALLET_ADDR
if [ -n "$WALLET_ADDR" ]; then
break
fi
fi
done
export PATH=${PATH}:${PWD}/
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc
echo "# LINE BELOW PUT HERE BY ENERGI HELPER SCRIPTS (UNOFFICIAL)" >> ~/.bashrc
echo "PATH=\${PATH}:${PWD}/bin/" >> ~/.bashrc
echo "ENERGI_WALLET_ADDR=${WALLET_ADDR}" >> ~/.bashrc
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc
echo ""
echo "Please run 'source ~/.bashrc' without quotes or log out and back in again (once)."
echo ""
echo "Afterwards, please try the following:"
echo ""
echo " - energi3-unlock to unlock and start staking"
echo " - energi3-status to obtain status"
echo ""
echo "More useful commands/scripts will be added in future!"
echo ""
exit 0