From 822b3e760e4840dc688a840610379d977cec7b0c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 2 Oct 2007 06:50:43 +0000 Subject: include the ucf font compiler and the ytty font in uuterm repository, incorporating a simple nonrecursive build system for the font. --- hexdraw.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 hexdraw.sh (limited to 'hexdraw.sh') diff --git a/hexdraw.sh b/hexdraw.sh new file mode 100755 index 0000000..78a6e74 --- /dev/null +++ b/hexdraw.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# Script to mimic the encoding half of Roman Czyborra's hexdraw +# script using only tr and sed. Should be 100% portable in both +# the POSIX sense and the legacy Unix sense. + +tr '[\n ]' '[ \n]' \ +| sed -e 's/ \([^ ]*\) /\1/g' \ +| tr '[\n ]' '[ \n]' \ +| sed -e '/^:/!b x +s/:/:@/ +: r +s/@----/0@/ +t r +s/@---#/1@/ +t r +s/@--#-/2@/ +t r +s/@--##/3@/ +t r +s/@-#--/4@/ +t r +s/@-#-#/5@/ +t r +s/@-##-/6@/ +t r +s/@-###/7@/ +t r +s/@#---/8@/ +t r +s/@#--#/9@/ +t r +s/@#-#-/A@/ +t r +s/@#-##/B@/ +t r +s/@##--/C@/ +t r +s/@##-#/D@/ +t r +s/@###-/E@/ +t r +s/@####/F@/ +t r +s/@// +: x' -- cgit v1.2.1