Last active
December 17, 2015 16:39
-
-
Save yyolk/5640283 to your computer and use it in GitHub Desktop.
bash script to start mining bitcoins with cgminer on osx
This file contains 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
require 'formula' | |
class Bfgminer < Formula | |
homepage 'https://github.com/luke-jr/bfgminer' | |
url 'http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.0.2/bfgminer-3.0.2.zip' | |
sha1 '43e01b571407d4a92dfdf9ca8b215fe3a1cc3fde' | |
depends_on 'autoconf' => :build | |
depends_on 'automake' => :build | |
depends_on 'libtool' => :build | |
depends_on 'pkg-config' => :build | |
depends_on 'curl' | |
depends_on 'jansson' | |
def install | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}", | |
"PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/jansson/lib/pkgconfig", | |
"--enable-scrypt" | |
system "make", "install" | |
end | |
test do | |
system "bfgminer" | |
end | |
end |
This file contains 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
require 'formula' | |
class Cgminer < Formula | |
homepage 'https://github.com/ckolivas/cgminer' | |
url 'https://github.com/ckolivas/cgminer/archive/v3.1.0.tar.gz' | |
sha1 '745465a0626b5c398aa1a675f533445e79a3cef4' | |
depends_on 'autoconf' => :build | |
depends_on 'automake' => :build | |
depends_on 'libtool' => :build | |
depends_on 'pkg-config' => :build | |
depends_on 'coreutils' => :build | |
depends_on 'curl' | |
depends_on 'jansson' | |
def install | |
inreplace "autogen.sh", "readlink", "greadlink" | |
system "./autogen.sh", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}", | |
"PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/jansson/lib/pkgconfig", | |
"--enable-scrypt" | |
system "make", "install" | |
end | |
test do | |
system "cgminer" | |
end | |
end |
This file contains 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 | |
if [[ -z "$1" ]] ; then | |
INTENSITY=3 | |
echo "No intensity (-I) given, defaulting to '3'" | |
else | |
INTENSITY=$1 | |
fi | |
cgminer -k diablo -o http://stratum.bitcoin.cz:3333 -u yolk.worker2 -p hurrdurr -I $INTENSITY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment