My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

get-bdf2u8g.sh 921B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env bash
  2. #####################################################################
  3. # get-bdf2u8g.sh for Marlin
  4. #
  5. # This script downloads, patches, and builds bdf2u8g
  6. # License: CC-SA
  7. #
  8. # Execute from within buildroot/share/fonts
  9. #
  10. #####################################################################
  11. HERE=$(pwd)
  12. for CMD in curl unzip patch make; do
  13. which $CMD >/dev/null || { echo "'$CMD' is required for this script." ; exit 1 ; }
  14. done
  15. [[ $HERE =~ 'buildroot/share/fonts'$ ]] || { echo "Change to buildroot/share/fonts to run $(basename $0)" ; exit 1; }
  16. # Download u8glib
  17. curl -LJO https://github.com/olikraus/u8glib/archive/master.zip
  18. unzip u8glib-master.zip >/dev/null 2>&1
  19. # Patch and build bdf2u8g
  20. cd u8glib-master/tools/font/bdf2u8g
  21. patch -p0 <../../../../u8glib-bdf2u8g.patch bdf2u8g.c >/dev/null 2>&1
  22. make >/dev/null 2>&1
  23. mv bdf2u8g ../../../../
  24. # Clean up
  25. cd -
  26. rm -rf u8glib-master*
  27. cd "$HERE"