fixed regression if SHELL=zsh
This commit is contained in:
parent
88199b8014
commit
9542d05e68
@ -1,7 +1,7 @@
|
|||||||
Summary: Displays where a particular program in your path is located
|
Summary: Displays where a particular program in your path is located
|
||||||
Name: which
|
Name: which
|
||||||
Version: 2.21
|
Version: 2.21
|
||||||
Release: 23%{?dist}
|
Release: 24%{?dist}
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
|
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
|
||||||
Source1: which2.sh
|
Source1: which2.sh
|
||||||
@ -40,6 +40,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|||||||
%{_mandir}/man1/which.1*
|
%{_mandir}/man1/which.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 23 2021 Than Ngo <than@redhat.com> - 2.21-24
|
||||||
|
- fixed regression if SHELL=zsh
|
||||||
|
|
||||||
* Sun Mar 21 2021 Than Ngo <than@redhat.com> - 2.21-23
|
* Sun Mar 21 2021 Than Ngo <than@redhat.com> - 2.21-23
|
||||||
- fixed coverity issues
|
- fixed coverity issues
|
||||||
- improved which2.sh
|
- improved which2.sh
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
# shellcheck shell=sh
|
||||||
# Initialization script for bash, sh, mksh and ksh
|
# Initialization script for bash, sh, mksh and ksh
|
||||||
|
|
||||||
_declare="declare -f"
|
_declare="declare -f"
|
||||||
_opt="-f"
|
_opt="-f"
|
||||||
|
_shell="$(basename $SHELL)"
|
||||||
|
|
||||||
if [ "$0" = "ksh" ] || [ "$0" = "-ksh" ] || [ "$0" = "mksh" ] || [ "$0" = "-mksh" ] ; then
|
if [ "$_shell" = "ksh" ] || [ "$_shell" = "mksh" ] || [ "$_shell" = "zsh" ] ; then
|
||||||
_declare="typeset -f"
|
_declare="typeset -f"
|
||||||
_opt=""
|
_opt=""
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user