From 3167a7a2d35173414fa1b333db4908ac140c1c4d Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 5 Sep 2016 14:17:11 +0200 Subject: mcolor: use awk in shebang This is reasonably portable, and easy to fix if not. The current hack breaks on OpenBSD. --- mcolor | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mcolor b/mcolor index 5a60adf..6ef43e1 100755 --- a/mcolor +++ b/mcolor @@ -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) } -- cgit 1.4.1