commit: be45bf5a5b1177231b1e1068ef02cff51c6257a1
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 20 09:18:24 2021 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Mar 21 16:11:04 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be45bf5a
app-shells/zsh: Minor improvements in zprofile
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
app-shells/zsh/files/zprofile-4 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app-shells/zsh/files/zprofile-4 b/app-shells/zsh/files/zprofile-4
index 2e33b11f491..b92c245784d 100644
--- a/app-shells/zsh/files/zprofile-4
+++ b/app-shells/zsh/files/zprofile-4
@@ -2,7 +2,7 @@
# Load environment settings from profile.env, which is created by
# env-update from the files in /etc/env.d
-if [ -e /etc/profile.env ] ; then
+if [[ -e /etc/profile.env ]] ; then
. /etc/profile.env
fi
@@ -22,7 +22,7 @@ umask 022
# It is intentional in the following line to use || instead of -o.
# This way the evaluation can be short-circuited and calling whoami is
# avoided.
-if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
+if [[ "$EUID" = "0" ]] || [[ "$USER" = "root" ]] ; then
# Check to make sure ROOTPATH is sane before we use it.
# https://bugs.gentoo.org/656400
if [[ :${ROOTPATH}: == *:/usr/sbin:* ]]; then
@@ -35,7 +35,7 @@ unset ROOTPATH
shopts=$-
setopt nullglob
for sh in /etc/profile.d/*.sh ; do
- [ -r "$sh" ] && . "$sh"
+ [[ -r "${sh}" ]] && . "${sh}"
done
unsetopt nullglob
set -$shopts