Skip to content

Commit

Permalink
app-shells/zsh: Minor improvements in zprofile
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Wendler <[email protected]>
  • Loading branch information
Lars Wendler committed Mar 21, 2021
1 parent b13ed8e commit be45bf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app-shells/zsh/files/zprofile-4
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit be45bf5

Please sign in to comment.