build_erupter.sh 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. echo "Cgminer BlockErupter Win32 builder:"
  3. echo ""
  4. export folder=$(pwd)
  5. cd ~
  6. if ! [ -d cgminer-blockerupter ]
  7. then
  8. git clone https://github.com/wareck/cgminer-gekko.git cgminer-blockerupter
  9. fi
  10. cd cgminer-blockerupter
  11. autoreconf -fi
  12. CFLAGS="-O2 -msse2 -fcommon " ./configure --host=i686-w64-mingw32.static --disable-shared --enable-blockerupter
  13. make
  14. strip cgminer.exe
  15. upx cgminer.exe
  16. if [ -d /tmp/cgminer-blockerupter ]; then rm -r -f /tmp/cgminer-blockerupter ;fi
  17. mkdir /tmp/cgminer-blockerupter
  18. cp cgminer.exe /tmp/cgminer-blockerupter
  19. cp $folder/packages/blockerupter/manual.pdf /tmp/cgminer-blockerupter/
  20. cp $folder/packages/blockerupter/start.bat /tmp/cgminer-blockerupter/
  21. cp $folder/packages/blockerupter/zadig-2.8.exe /tmp/cgminer-blockerupter/
  22. cp $folder/packages/blockerupter/cgminer.conf /tmp/cgminer-blockerupter/
  23. cd /tmp/
  24. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  25. 7z a -tzip cgminer-blockerupter-$version.zip cgminer-blockerupter
  26. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  27. put cgminer-blockerupter-$version.zip -o /crypto/cgminer/cgminer-blockerupter-$version.zip
  28. EOF
  29. if ! [ -d /home/$USER/Bureau/win32_build/ ]; then mkdir /home/$USER/Bureau/win32_build ;fi
  30. cp cgminer-blockerupter-$version.zip /home/$USER/Bureau/win32_build