From 776275d9a76d4c5936a3f2ba1c3d3fe73ba2e946 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 16 May 2022 01:36:06 -0300 Subject: etc/bash/rc: Use "-e" instead of "-r" before sourcing files I previously had the impression that "-r" tested for a "readable file", when it actually works on directories too. So I'm sticking to the more general "-e" instead. --- etc/bash/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc/bash') diff --git a/etc/bash/rc b/etc/bash/rc index 3990ebe..1cfd404 100644 --- a/etc/bash/rc +++ b/etc/bash/rc @@ -20,7 +20,7 @@ mkdir -p \ "$XDG_LOG_HOME" GUIX_PROFILE="$XDG_CONFIG_HOME"/guix/current -if [ -r "$GUIX_PROFILE"/etc/profile ]; then +if [ -e "$GUIX_PROFILE"/etc/profile ]; then . "$GUIX_PROFILE"/etc/profile fi @@ -325,7 +325,7 @@ chmod 600 "$XDG_CONFIG_HOME"/ssh/id_rsa.pub stty -ixon # Disable C-s/C-q mode -if [ -r "$XDG_CONFIG_HOME"/bash/privrc.sh ]; then +if [ -e "$XDG_CONFIG_HOME"/bash/privrc.sh ]; then # Extra rc code to be loaded, stored in private repository . "$XDG_CONFIG_HOME"/bash/privrc.sh fi -- cgit v1.2.3