fixed 1817138 - Invalid syntax in /etc/profile.d/which2.sh:3: = not found

This commit is contained in:
Than Ngo 2020-03-25 18:07:24 +01:00
parent d07598b6fa
commit f988253071
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
Summary: Displays where a particular program in your path is located
Name: which
Version: 2.21
Release: 18%{?dist}
Release: 19%{?dist}
License: GPLv3
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
Source1: which2.sh
@ -39,6 +39,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%{_mandir}/man1/which.1*
%changelog
* Wed Mar 25 2020 Than Ngo <than@redhat.com> - 2.21-19
- fixed #1817138 - Invalid syntax in /etc/profile.d/which2
* Tue Mar 24 2020 Than Ngo <than@redhat.com> - 2.21-18
- set correct alias for mksh

View File

@ -1,6 +1,6 @@
# Initialization script for bash and sh
if [ "$0" == "ksh" -o "$0" == "-ksh" -o "$0" == "mksh" -o "$0" == "-mksh" ] ; then
if [ "$0" = "ksh" -o "$0" = "-ksh" -o "$0" = "mksh" -o "$0" = "-mksh" ] ; then
alias which='(alias; typeset -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
else
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'