Skip to content

Instantly share code, notes, and snippets.

@skull-squadron
Created September 13, 2024 10:11
Show Gist options
  • Save skull-squadron/a3bbcccfcff0ab3a57e7ad9e77d36050 to your computer and use it in GitHub Desktop.
Save skull-squadron/a3bbcccfcff0ab3a57e7ad9e77d36050 to your computer and use it in GitHub Desktop.
Autotools (automake/autoconf/m4) ./configure script colorizer
#!/usr/bin/env bash
set -Eeuo pipefail
[ -t 1 ] || exec cat
r=$'\e[91m' g=$'\e[92m' y=$'\e[93m' reset=$'\e[0m'
exec perl -pe "s/\.\. (?!yes$|no$)(.+)/.. ${y}\\1${reset}/i;s/\.\. (no)$/.. ${r}\\1${reset}/i;s/\.\. (yes)$/.. ${g}\\1${reset}/i"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment