Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
revoxhere
GitHub Repository: revoxhere/duino-coin
Path: blob/master/Tools/duco-install-rpi.sh
925 views
1
#!/bin/sh
2
# Made by Grantrocks
3
u="$USER"
4
echo "Installing Duino Coin On Your Raspberry Pi"
5
sleep 1
6
sudo apt update
7
sudo apt install python3 python3-pip git python3-pil python3-pil.imagetk -y # Install dependencies
8
cd
9
10
# Update if duino con exists
11
if [ -d ~/duino-coin/ ];then
12
cd ~/duino-coin
13
git pull
14
fi
15
16
if [ ! -d ~/duino-coin/ ];then
17
echo "Duino Coin not yet downloaded. Downloading...."
18
git clone https://github.com/revoxhere/duino-coin # Clone Duino-Coin repository
19
fi
20
21
cd ~/duino-coin
22
echo "Installing Python packages"
23
python3 -m pip install -r requirements.txt # Install pip dependencies
24
25
#Check if the app exists
26
if [ ! -f ~/.local/share/applications/duino-coin-pc-miner.desktop ];then
27
echo "Creating PC Miner button..."
28
fi
29
30
# Shortcut For PC Miner
31
32
mkdir -p ~/.local/share/applications
33
echo "[Desktop Entry]
34
Name=Duino Coin PC Miner
35
Comment=Duino Coin miner for the Raspberry Pi
36
Exec=python3 /home/$u/duino-coin/PC_Miner.py
37
Icon=/home/$u/duino-coin/Resources/PCMiner.png
38
Terminal=true
39
Type=Application
40
Categories=Utility;
41
StartupNotify=true" > ~/.local/share/applications/duino-coin-pc-miner.desktop
42
43
# Check if the app exists
44
if [ ! -f ~/.local/share/applications/duino-coin-avr.desktop ];then
45
echo "Creating AVR Miner menu button..."
46
fi
47
48
#Create The Shortcut For Avr Miner
49
echo "[Desktop Entry]
50
Name=Duino Coin AVR Miner
51
Comment=AVR miner for duino coin.
52
Exec=python3 /home/$u/duino-coin/AVR_Miner.py
53
Icon=/home/$u/duino-coin/Resources/AVRMiner.png
54
Terminal=true
55
Type=Application
56
Categories=Utility;
57
StartupNotify=true" > ~/.local/share/applications/duino-coin-avr.desktop
58
cd ~/
59
if [ -f ~/duco-install-rpi.sh ]; then
60
rm duco-install-rpi.sh
61
fi
62
echo "Installed"
63
64