mcolor: use awk in shebang

This is reasonably portable, and easy to fix if not.
The current hack breaks on OpenBSD.
pull/10/head
Christian Neukirchen 8 years ago
parent 19405f51b4
commit 3167a7a2d3

@ -1,9 +1,6 @@
#!/bin/sh
#!/usr/bin/awk -f
# mcolor - colorize rendered mail
# restart as awk script
true + /; exec awk -f "$0"; exit; / {}
function co(n, c) { e = ENVIRON["MCOLOR_" n]; return e ? e : c }
function fg(c, s) { return sprintf("\033[38;5;%03dm%s\033[0m", c, s) }
function so(s) { return sprintf("\033[1m%s\033[0m", s) }

Loading…
Cancel
Save