build_bitaxe.sh 1.3 KB

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