aboutsummaryrefslogtreecommitdiff
path: root/buildroot/share/fonts/get-bdf2u8g.sh
diff options
context:
space:
mode:
authorGeorgiy Bondarenko <69736697+nehilo@users.noreply.github.com>2021-03-04 20:54:23 +0300
committerGeorgiy Bondarenko <69736697+nehilo@users.noreply.github.com>2021-03-04 20:54:23 +0300
commite8701195e66f2d27ffe17fb514eae8173795aaf7 (patch)
tree9f519c4abf6556b9ae7190a6210d87ead1dfadde /buildroot/share/fonts/get-bdf2u8g.sh
downloadkp3s-lgvl-e8701195e66f2d27ffe17fb514eae8173795aaf7.tar.xz
kp3s-lgvl-e8701195e66f2d27ffe17fb514eae8173795aaf7.zip
Initial commit
Diffstat (limited to 'buildroot/share/fonts/get-bdf2u8g.sh')
-rw-r--r--buildroot/share/fonts/get-bdf2u8g.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/buildroot/share/fonts/get-bdf2u8g.sh b/buildroot/share/fonts/get-bdf2u8g.sh
new file mode 100644
index 0000000..5851bf9
--- /dev/null
+++ b/buildroot/share/fonts/get-bdf2u8g.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+#####################################################################
+# get-bdf2u8g.sh for Marlin
+#
+# This script downloads, patches, and builds bdf2u8g
+# License: CC-SA
+#
+# Execute from within buildroot/share/fonts
+#
+#####################################################################
+
+HERE=$(pwd)
+
+for CMD in curl unzip patch make; do
+ which $CMD >/dev/null || { echo "'$CMD' is required for this script." ; exit 1 ; }
+done
+
+[[ $HERE =~ 'buildroot/share/fonts'$ ]] || { echo "Change to buildroot/share/fonts to run $(basename $0)" ; exit 1; }
+
+# Download u8glib
+curl -LJO https://github.com/olikraus/u8glib/archive/master.zip
+unzip u8glib-master.zip >/dev/null 2>&1
+
+# Patch and build bdf2u8g
+cd u8glib-master/tools/font/bdf2u8g
+patch -p0 <../../../../u8glib-bdf2u8g.patch bdf2u8g.c >/dev/null 2>&1
+make >/dev/null 2>&1
+mv bdf2u8g ../../../../
+
+# Clean up
+cd -
+rm -rf u8glib-master*
+
+cd "$HERE"