build_gekko.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. export folder=$(pwd)
  3. cd ~
  4. if ! [ -d cgminer-gekko ]
  5. then
  6. git clone https://github.com/wareck/cgminer-gekko.git
  7. else
  8. cd cgminer-gekko
  9. git pull
  10. cd ..
  11. fi
  12. cd cgminer-gekko
  13. autoreconf -fi
  14. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.static --disable-shared --enable-gekko --with-system-libusb
  15. #--enable-bflsc --enable-bitforce --enable-bitfury --enable-cointerra --enable-drillbit --enable-hashfast --enable-hashratio --enable-icarus --enable-klondike --enable-modminer
  16. make
  17. strip cgminer.exe
  18. #upx cgminer.exe
  19. mkdir /tmp/cgminer-gekko
  20. cp cgminer.exe /tmp/cgminer-gekko
  21. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko/
  22. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko/
  23. cp $folder/packages/gekko/zadig-2.7.exe /tmp/cgminer-gekko/
  24. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko/
  25. cd /tmp/
  26. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  27. 7z a -tzip cgminer-gekko-$version.zip cgminer-gekko
  28. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  29. put cgminer-gekko-$version.zip -o /crypto/cgminer-gekko-$version.zip
  30. EOF
  31. cp cgminer-gekko-$version.zip /home/$USER/Bureau
  32. cd /home/wareck/cgminer-gekko
  33. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.static --disable-shared --with-system-libusb --enable-gekko --enable-bflsc --enable-bitforce --enable-bitfury --enable-cointerra --enable-drillbit --enable-hashfast --enable-hashratio --enable-icarus --enable-klondike --enable-modminer
  34. make
  35. strip cgminer.exe
  36. #upx cgminer.exe
  37. rm -r -f /tmp/cgminer-gekko
  38. mkdir /tmp/cgminer-gekko-all-usb
  39. cp cgminer.exe /tmp/cgminer-gekko-all-usb
  40. cp $folder/packages/gekko/manual.pdf /tmp/cgminer-gekko-all-usb/
  41. cp $folder/packages/gekko/start.bat /tmp/cgminer-gekko-all-usb/
  42. cp $folder/packages/gekko/zadig-2.7.exe /tmp/cgminer-gekko-all-usb/
  43. cp $folder/packages/gekko/cgminer.conf /tmp/cgminer-gekko-all-usb/
  44. cd /tmp/
  45. version=`git ls-remote -h https://github.com/wareck/cgminer-gekko.git | awk '{print $1}' |cut -c1-7`
  46. 7z a -tzip cgminer-gekko-all-usb-$version.zip cgminer-gekko-all-usb
  47. lftp -u wareck,zorn692611 ftpperso.free.fr <<EOF
  48. put cgminer-gekko-all-usb-$version.zip -o /crypto/cgminer-gekko-all-usb-$version.zip
  49. EOF
  50. cp cgminer-gekko-all-usb-$version.zip /home/$USER/Bureau
  51. cd /tmp
  52. rm -r -f /tmp/cgminer-gekko-all-usb