less.csh: avoid unnecessary stat() call
Resolves: #1321591 Version: 481-3
This commit is contained in:
parent
11bfc57bdf
commit
32b553bce3
12
less.csh
12
less.csh
@ -1,8 +1,14 @@
|
|||||||
# less initialization script (csh)
|
# less initialization script (csh)
|
||||||
if ( -x /usr/bin/lesspipe.sh ) then
|
|
||||||
if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then
|
# All less.*sh files should have the same semantics!
|
||||||
|
|
||||||
|
# In case you are curious, the test for non-emptiness is not as easy as in
|
||||||
|
# Bourne shell. This "eval" construct is probably inspired by Stack
|
||||||
|
# Overflow question 13343392.
|
||||||
|
if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
|
if ( -x /usr/bin/lesspipe.sh ) then
|
||||||
setenv LESSOPEN "|/usr/bin/lesspipe.sh %s"
|
setenv LESSOPEN "|/usr/bin/lesspipe.sh %s"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
3
less.sh
3
less.sh
@ -1,4 +1,7 @@
|
|||||||
# less initialization script (sh)
|
# less initialization script (sh)
|
||||||
|
|
||||||
|
# All less.*sh files should have the same semantics!
|
||||||
|
|
||||||
if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then
|
if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then
|
||||||
export LESSOPEN="|/usr/bin/lesspipe.sh %s"
|
export LESSOPEN="|/usr/bin/lesspipe.sh %s"
|
||||||
fi
|
fi
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A text file browser similar to more, but better
|
Summary: A text file browser similar to more, but better
|
||||||
Name: less
|
Name: less
|
||||||
Version: 481
|
Version: 481
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+ or BSD
|
License: GPLv3+ or BSD
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
||||||
@ -67,6 +67,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 29 2016 Pavel Raiskup <praiskup@redhat.com> - 481-3
|
||||||
|
- avoid one ubiquitous stat() call in less.sh and less.csh if possible
|
||||||
|
(rhbz#1321591)
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 481-2
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 481-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user