diff --git a/colorzgrep.csh b/colorzgrep.csh new file mode 100644 index 0000000000000000000000000000000000000000..71d03bb8bc8fa574b05edaaa1caf35f5c2e08da7 --- /dev/null +++ b/colorzgrep.csh @@ -0,0 +1,9 @@ +t -f /usr/libexec/grepconf.sh +if ( $status == 1 ) exit + +/usr/libexec/grepconf.sh -c +if ( $status == 1 ) exit + +alias zgrep 'zgrep --color=auto' +alias zfgrep 'zfgrep --color=auto' +alias zegrep 'zegrep --color=auto' diff --git a/colorzgrep.sh b/colorzgrep.sh new file mode 100644 index 0000000000000000000000000000000000000000..7764a07a823ec9f158b07a4190e0c0b6fff45b34 --- /dev/null +++ b/colorzgrep.sh @@ -0,0 +1,6 @@ +[ -f /usr/libexec/grepconf.sh ] || return + +/usr/libexec/grepconf.sh -c || return +alias zgrep='zgrep --color=auto' 2>/dev/null +alias zfgrep='zfgrep --color=auto' 2>/dev/null +alias zegrep='zegrep --color=auto' 2>/dev/null diff --git a/gzip.spec b/gzip.spec index ec576d459182c16d76f6dda05a6820c54715cce0..56a5708cc563d91ab33219142aac04e89dfbaa27 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,11 +1,13 @@ Name: gzip Version: 1.12 -Release: 1 +Release: 2 Summary: A data compression utility License: GPLv3 URL: https://www.gnu.org/software/gzip Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz +Source1: colorzgrep.csh +Source2: colorzgrep.sh Patch9000: fix-verbose-disable.patch Patch9001: performance-neoncrc32-and-prfm.patch @@ -42,6 +44,12 @@ rm -rf %RPM_BUILD_ROOT # ncompress provides uncompress, may cause conflict. rm -f %{buildroot}%{_bindir}/uncompress +# config color alias for z*grep +%global profiledir %{_sysconfdir}/profile.d +mkdir -p %{buildroot}%{profiledir} +install -p -m 644 %{SOURCE1} %{buildroot}%{profiledir} +install -p -m 644 %{SOURCE2} %{buildroot}%{profiledir} + %check make check @@ -50,6 +58,7 @@ make check %doc AUTHORS ChangeLog README %license COPYING %{_bindir}/* +%{profiledir}/* %exclude %{_infodir}/dir %files help @@ -58,6 +67,9 @@ make check %{_mandir}/man1/* %changelog +* Tue Sep 20 2022 renhongxun - 1.12-2 +- config color alias for z*grep + * Sat Jun 11 2022 YukariChiba - 1.12-1 - Upgrade version.