Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Oct 2022 14:36:01 GMT
From:      =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d3890a547d20 - main - sh: when loading profile, skip obvious scratch files.
Message-ID:  <202210031436.293Ea1Xp009827@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=d3890a547d201d1f5043e51baa406ac9d5d3a60a

commit d3890a547d201d1f5043e51baa406ac9d5d3a60a
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2022-10-02 12:23:28 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2022-10-03 14:35:51 +0000

    sh: when loading profile, skip obvious scratch files.
    
    Differential Revision: https://reviews.freebsd.org/D36856
---
 bin/sh/profile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/sh/profile b/bin/sh/profile
index afcbeaf4110b..ac6acced6596 100644
--- a/bin/sh/profile
+++ b/bin/sh/profile
@@ -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}":*)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210031436.293Ea1Xp009827>