#!/bin/bash export folder=$(pwd) sudo apt-get install upx -y sudo cp packages/mingw-bundledlls /usr/local/bin cd ~ wget -c https://github.com/troydhanson/uthash/archive/master.zip -O uthash-dev.zip unzip uthash-dev.zip cd uthash-master sudo cp src/* /opt/mxe/usr/i686-w64-mingw32.shared/include/ cd ~ git clone https://github.com/wareck/bfgminer.git cd bfgminer #sudo sed -i -e "s/FutureBit,scrypt,auto/FutureBit,scrypt,no/g" configure.ac ./autogen.sh CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --enable-scrypt --enable-futurebit --disable-other-drivers make mkdir ~/out_tmp cp *.exe ~/out_tmp cd ~/out_tmp mingw-bundledlls --copy --upx bfgminer.exe mkdir /tmp/bfgminer cp ~/out_tmp/* /tmp/bfgminer cp $folder/packages/bfgminer/* /tmp/bfgminer/ cd /tmp version=`git ls-remote -h https://github.com/wareck/bfgminer.git | awk '{print $1}' |cut -c1-7 | head -3 | tail -1` 7z a bfgminer-wrk-$version-win64.7z bfgminer lftp -u wareck,zorn692611 ftpperso.free.fr <