diff options
author | Rich Felker <dalias@aerifal.cx> | 2007-10-02 06:50:43 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2007-10-02 06:50:43 +0000 |
commit | 822b3e760e4840dc688a840610379d977cec7b0c (patch) | |
tree | d4b6f5f61a6862cd988dbe95b96e6e4c19881c40 /hexdraw.sh | |
parent | 2a2e17bc6d57137bca9d764c23f1b178536900cd (diff) |
include the ucf font compiler and the ytty font in uuterm repository,
incorporating a simple nonrecursive build system for the font.
Diffstat (limited to 'hexdraw.sh')
-rwxr-xr-x | hexdraw.sh | 45 |
1 files changed, 45 insertions, 0 deletions
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' |