mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
sh: when loading profile, skip obvious scratch files.
Differential Revision: https://reviews.freebsd.org/D36856
This commit is contained in:
parent
2515552e62
commit
d3890a547d
|
@ -19,6 +19,11 @@ _loaded=${_loaded:-/etc/profile}
|
|||
export _loaded
|
||||
for _dir in /etc /usr/local/etc ; do
|
||||
for _file in "${_dir}"/profile "${_dir}"/profile.d/* ; do
|
||||
case ${_file} in
|
||||
*[~#]|*.OLD|*.bak|*.orig|*,v)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if [ -f "${_file}" ] ; then
|
||||
case :${_loaded}: in
|
||||
*:"${_file}":*)
|
||||
|
|
Loading…
Reference in a new issue