Created
September 13, 2024 10:11
-
-
Save skull-squadron/a3bbcccfcff0ab3a57e7ad9e77d36050 to your computer and use it in GitHub Desktop.
Autotools (automake/autoconf/m4) ./configure script colorizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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