- add pathmunge to /etc/kshrc

This commit is contained in:
Michal Hlavinka 2010-05-31 12:39:06 +00:00
parent 62b429bf63
commit e3b3c9380a
2 changed files with 19 additions and 1 deletions

View File

@ -6,7 +6,7 @@ URL: http://www.kornshell.com/
Group: System Environment/Shells
License: CPL
Version: 20100309
Release: 5%{?dist}
Release: 6%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source3: kshrc.rhs
@ -107,6 +107,9 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
* Mon May 31 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-6
- add pathmunge to /etc/kshrc
* Wed May 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-5
- fix rare cd builtin crash (#578582)

View File

@ -20,6 +20,21 @@ _src_etc_profile_d()
unset i
fi
}
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ]; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}
_src_etc_profile_d
unset -f _src_etc_profile_d
unset -f pathmunge