2 include Language::Python::Shebang
4 desc "Colorize logfiles and command output"
5 homepage "https://kassiopeia.juls.savba.sk/~garabik/software/grc.html"
6 url "https://github.com/garabik/grc/archive/refs/tags/v1.13.tar.gz"
7 sha256 "a7b10d4316b59ca50f6b749f1d080cea0b41cb3b7258099c3eb195659d1f144f"
8 license "GPL-2.0-or-later"
10 head "https://github.com/garabik/grc.git", branch: "devel"
14 sha256 cellar: :any_skip_relocation, all: "c53a320fd40831dbfd74a3add881c94b5d8bca074b6826c190f35c1a3316d96d"
17 depends_on "python@3.13"
20 # fix non-standard prefix installs
21 inreplace "grc", "/usr/local/etc/", "#{etc}/"
22 inreplace "grc.1", " /etc/", " #{etc}/"
23 inreplace ["grcat", "grcat.1"], "/usr/local/share/grc/", "#{pkgshare}/"
25 # so that the completions don't end up in etc/profile.d
26 inreplace "install.sh",
27 "mkdir -p $PROFILEDIR\ncp -fv grc.sh $PROFILEDIR", ""
29 rewrite_shebang detected_python_shebang, "grc", "grcat"
31 system "./install.sh", prefix, HOMEBREW_PREFIX
34 etc.install "grc.fish"
35 zsh_completion.install "_grc"
39 actual = pipe_output("#{bin}/grcat #{pkgshare}/conf.ls", "hello root")
40 assert_equal "\e[0mhello \e[0m\e[1m\e[37m\e[41mroot\e[0m", actual.chomp