config color alias for z*grep
This commit is contained in:
parent
2d8349f063
commit
21ee4e312e
9
colorzgrep.csh
Normal file
9
colorzgrep.csh
Normal file
@ -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'
|
||||
6
colorzgrep.sh
Normal file
6
colorzgrep.sh
Normal file
@ -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
|
||||
14
gzip.spec
14
gzip.spec
@ -1,11 +1,13 @@
|
||||
Name: gzip
|
||||
Version: 1.12
|
||||
Release: 2
|
||||
Release: 3
|
||||
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
|
||||
|
||||
Patch6000: backport-gzip-detect-invalid-input.patch
|
||||
Patch6001: backport-gzip-test-invalid-input-bug.patch
|
||||
@ -45,6 +47,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
|
||||
|
||||
@ -53,6 +61,7 @@ make check
|
||||
%doc AUTHORS ChangeLog README
|
||||
%license COPYING
|
||||
%{_bindir}/*
|
||||
%{profiledir}/*
|
||||
%exclude %{_infodir}/dir
|
||||
|
||||
%files help
|
||||
@ -61,6 +70,9 @@ make check
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 20 2022 renhongxun <renhongxun@h-partners.com> - 1.12-3
|
||||
- config color alias for z*grep
|
||||
|
||||
* Thu Jul 28 2022 Lv Ying <lvying6@huawei.com> - 1.12-2
|
||||
- backport bugfix patch: detect invalid input
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user