Last active
October 25, 2021 12:05
-
-
Save Kirbo/c36c1ed59d78a03b68c7e00d9ec336c9 to your computer and use it in GitHub Desktop.
cpuminer-gr update script for msOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source ~/.bashrc | |
# Take the desired version from the first argument, default: 1.2.3 | |
CPUMINER_VERSION=${1:-"1.2.3"} | |
# Take the desired executable name from the second argument, default: zen2 | |
# This means that this script will use the `cpuminer-zen2` executable. Read more which | |
# executable you should use, here: https://github.com/WyvernTKC/cpuminer-gr-avx2/blob/main/readme.txt | |
CPUMINER_COMMAND=${2:-"zen2"} | |
# Navigates to "clients" folder | |
cd /home/minerstat/minerstat-os/clients | |
# Downloads the desired version of "cpuminer-gr" | |
wget "https://github.com/WyvernTKC/cpuminer-gr-avx2/releases/download/${CPUMINER_VERSION}/cpuminer-gr-${CPUMINER_VERSION}-x86_64_linux.tar.gz" | |
# Extracts the archive | |
tar -xvf "cpuminer-gr-${CPUMINER_VERSION}-x86_64_linux.tar.gz" "cpuminer-gr-${CPUMINER_VERSION}-x86_64_linux" | |
# Stops mining | |
sudo /home/minerstat/minerstat-os/core/stop | |
# Removes the old executable | |
rm cpuminer-opt/cpuminer | |
# Copies the desired new executable | |
cp "cpuminer-gr-${CPUMINER_VERSION}-x86_64_linux/binaries/cpuminer-${CPUMINER_COMMAND}" cpuminer-opt/cpuminer | |
# Removes the downloaded/extracted archive of "cpuminer-gr" | |
rm -rf "cpuminer-gr-${CPUMINER_VERSION}-x86_64_linux" | |
# Starts mining | |
sudo /home/minerstat/minerstat-os/core/start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment