-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.sh
executable file
·32 lines (23 loc) · 1.01 KB
/
update.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
#!/bin/bash
reset
# temp workdir
rm -rf temp; mkdir temp; cd temp
# Get Releases
response=$(curl -s "https://api.github.com/repos/develsoftware/GMinerRelease/releases/latest")
download_url=$(echo "$response" | grep -E '"browser_download_url".*([^.]linux.*)"' | sed -E 's/.*"([^"]+)".*/\1/')
wget $download_url -O gminer.tar.xz
response=$(curl -s "https://api.github.com/repos/Lolliedieb/lolMiner-releases/releases/latest")
download_url=$(echo "$response" | grep -E '"browser_download_url".*([^.]Lin64.*)"' | sed -E 's/.*"([^"]+)".*/\1/')
wget $download_url -O lolminer.tar.gz
response=$(curl -s "https://api.github.com/repos/nanopool/nanominer/releases/latest")
download_url=$(echo "$response" | grep -E '"browser_download_url".*([^.]linux.*)"' | sed -E 's/.*"([^"]+)".*/\1/')
wget $download_url -O nanominer.tar.gz
# Extract releases
tar -xf gminer.tar.xz
tar -xf lolminer.tar.gz
tar -xf nanominer.tar.gz
# Remove unwanted items
mv miner ../gminer
mv nanominer ../nanom
mv `find . -name "lolMiner"` ../lolm
cd ../; rm -rf temp