build_gekko.sh 2.5 KB

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