diff options
author | Mattias Andrée <maandree@kth.se> | 2021-02-07 00:24:39 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-02-07 00:24:39 +0100 |
commit | 68dd947b82c6508cb72558130759c9eb2480f1eb (patch) | |
tree | 519b32f07c9f46d48849acb88c6687ecb28db12b /digit.sh | |
parent | Add posix time support (diff) | |
download | mongotimer-68dd947b82c6508cb72558130759c9eb2480f1eb.tar.gz mongotimer-68dd947b82c6508cb72558130759c9eb2480f1eb.tar.bz2 mongotimer-68dd947b82c6508cb72558130759c9eb2480f1eb.tar.xz |
Fork mongoclock and turn into a timer and stopwatch
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'digit.sh')
-rwxr-xr-x | digit.sh | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -176,6 +176,22 @@ mongo_c() { ' ' } +mongo_m() { + printf '%s\n' \ + ' ' \ + ' ' \ + ' ' \ + ' ' \ + ' ' \ + ' [XXXXXXXXXX] ' \ + ' [XXXXXXXXXX] ' \ + ' ' \ + ' ' \ + ' ' \ + ' ' \ + ' ' +} + digit() { if test "$1" = 0; then mongo_0 @@ -197,14 +213,16 @@ digit() { mongo_8 elif test "$1" = 9; then mongo_9 - else + elif test "$1" = c; then mongo_c + else + mongo_m fi } printf 'static const char *mongo_%s[] = {\n' "$1" digit "$1" | \ - sed -e 's/X/ /g' -e 's/\[/\\033\[7m /g' -e 's/\]/\\033\[m /g' | \ + sed -e 's/X/ /g' -e 's/\[/\\033\[7m /g' -e 's/\]/\\033\[27m /g' | \ sed -e 's/^/"/' -e 's/$/",/' | \ sed '$s/,$//' printf '};\n' |