-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·111 lines (98 loc) · 2.91 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/bash
MAIN=~/.auto-plotter
T_CONF=~/.auto-plotter/tmp.conf
P_CONF=~/.auto-plotter/plot.conf
MNE=~/.auto-plotter/mnemonic.conf
ALIAS="alias autoplotter='~/.plot.sh'"
cat logo.txt
mkdir -p ~/.auto-plotter
if [[ ! -e ~/.auto-plotter/tmp.conf || ! -e ~/.auto-plotter/plot.conf || ! -e ~/.auto-plotter/mnemonic.conf ]]; then
touch ~/.auto-plotter/tmp.conf
chmod 777 $T_CONF
touch ~/.auto-plotter/plot.conf
chmod 777 $P_CONF
touch ~/.auto-plotter/mnemonic.conf
chmod 777 $MNE
echo 'Enter mnemonic:'
read mnemonic
echo $mnemonic >> $MNE
echo 'Enter path to temporary chia folder (press enter to skip)'
read var
if [[ $var -z ]]; then
echo 'skipping...'
sleep 10
else
echo $var >> $T_CONF
echo "Would you like to add more temporary folders? [Y/n]"
read opt
if [[ $opt != 'n' || $opt != 'N' ]]; then
echo $var >> $T_CONF
echo "Enter folder path (Type 'q' to move on)"
read $var
while [[ $var != 'q']]
do
echo $var >> $T_CONF
echo "Enter folder path (Type 'q' to move on)"
read $var
done
else
echo 'moving on...'
fi
fi
echo 'Would you like to add chia plot folder? (press enter to skip)'
read $var
if [[ $var -z ]]; then
echo 'skipping...'
sleep 10
else
echo $var >> $P_CONF
echo "Would you like to add more plot folders? [Y/n]"
read opt
if [[ $opt != 'n' || $opt != 'N' ]]; then
echo "Enter folder path (Type 'q' to move on)"
read $var
echo $var >> $P_CONF
while [[ $var != 'q']]
do
echo "Enter folder path (Type 'q' to move on)"
read $var
echo $var >> $P_CONF
done
else
echo 'moving on...'
fi
fi
fi
tar -xf auto-plotter.tar.gz -C ~/.auto-plotter/
cd $MAIN
mv .plot.sh ~/.plot.sh
echo 'Would you like to create alias in your shell configuration profile? [Y/n]'
read $opt
if [[ $opt != 'n' || $opt != 'N' ]]; then
echo 'progress: [---------------] 0%'
echo $ALIAS >> ~/.bashrc > /dev/null
echo 'progress: [#####----------] 33%'
echo $ALIAS >> ~/.zshrc > /dev/null
echo 'progress: [############---] 70%'
echo $ALIAS >> ~/.config/fish/config.fish > /dev/null
echo 'progress: [###############] 100%'
sleep 5
echo 'process finished...'
echo "Now to run script just type 'autoplotter' in your terminal"
else
echo "To start script you will need to type './.plot.sh' in your home directory"
fi
cat logo.txt
sleep 5
clear
echo 'Would you like to start plotting now? [y/N]'
read $opt
if [[ $opt != 'n' || $opt != 'N' ]]; then
echo 'Installation complited'
else
cd ~
./.plot.sh
echo 'Installation complited'
echo 'Starting plotting...'
sleep 5
fi