consmirror.c: the BSD notice is replaced (Makronix's own file). Files with changes of other sessions pending are left for their commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
58 lines
1.7 KiB
Bash
Executable File
58 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
|
|
# logo-ascii.sh -- the Makronix logo in 7-bit ASCII, for the console.
|
|
#
|
|
# usage: logo-ascii.sh [-s]
|
|
# (none) the logo: the M in a frame, the word MAKRONIX, the subline; 64 columns
|
|
# -s the small one, one line high enough for a banner: [M] MAKRONIX
|
|
#
|
|
# Prints on stdout. docs/logo/makronix.txt is this output; the boot.cfg
|
|
# banners, /etc/motd and the installer can carry it. Pure 7-bit ASCII: the
|
|
# console of the loader and the serial console draw nothing else safely.
|
|
|
|
set -u
|
|
|
|
if [ "${1:-}" = -s ]; then
|
|
echo "[M] MAKRONIX - based on NetBSD"
|
|
exit 0
|
|
fi
|
|
|
|
# 5x5 letters; "." is a blank, so that the table stays readable
|
|
M1='#...#'; M2='##.##'; M3='#.#.#'; M4='#...#'; M5='#...#'
|
|
A1='.###.'; A2='#...#'; A3='#####'; A4='#...#'; A5='#...#'
|
|
K1='#...#'; K2='#..#.'; K3='###..'; K4='#..#.'; K5='#...#'
|
|
R1='####.'; R2='#...#'; R3='####.'; R4='#..#.'; R5='#...#'
|
|
O1='.###.'; O2='#...#'; O3='#...#'; O4='#...#'; O5='.###.'
|
|
N1='#...#'; N2='##..#'; N3='#.#.#'; N4='#..##'; N5='#...#'
|
|
I1='#####'; I2='..#..'; I3='..#..'; I4='..#..'; I5='#####'
|
|
X1='#...#'; X2='.#.#.'; X3='..#..'; X4='.#.#.'; X5='#...#'
|
|
|
|
word()
|
|
{
|
|
r=$1
|
|
line=
|
|
for l in M A K R O N I X; do
|
|
eval "g=\$${l}${r}"
|
|
line="$line$g "
|
|
done
|
|
echo "$line" | tr '.' ' ' | sed 's/ *$//'
|
|
}
|
|
|
|
# the emblem: the M in a frame, 13 columns, 7 lines
|
|
E0='.-----------.'
|
|
E1='| # # |'
|
|
E2='| ## ## |'
|
|
E3='| # # # # # |'
|
|
E4='| # # # # |'
|
|
E5='| # # # |'
|
|
E6="'-----------'"
|
|
|
|
pad=' '
|
|
echo "$E0"
|
|
echo "$E1$pad$(word 1)"
|
|
echo "$E2$pad$(word 2)"
|
|
echo "$E3$pad$(word 3)"
|
|
echo "$E4$pad$(word 4)"
|
|
echo "$E5$pad$(word 5)"
|
|
printf '%s%sbased on NetBSD 0.99.9\n' "$E6" "$pad"
|